mirror of
https://git.coom.tech/drummyfish/small3dlib.git
synced 2024-11-21 20:39:57 +01:00
Start camera control (city)
This commit is contained in:
parent
8062fe8f4c
commit
1763cc3454
2 changed files with 5 additions and 5 deletions
|
@ -318,11 +318,14 @@ int main()
|
||||||
else
|
else
|
||||||
velocity = S3L_min(0,velocity + stepFriction * friction);
|
velocity = S3L_min(0,velocity + stepFriction * friction);
|
||||||
|
|
||||||
|
S3L_Unit cameraDistance =
|
||||||
|
S3L_FRACTIONS_PER_UNIT / 2 + (S3L_abs(velocity) * (S3L_FRACTIONS_PER_UNIT / 2) / MAX_VELOCITY);
|
||||||
|
|
||||||
scene.camera.transform.translation.x =
|
scene.camera.transform.translation.x =
|
||||||
scene.models[1].transform.translation.x - carDirection.x;
|
scene.models[1].transform.translation.x - (carDirection.x * cameraDistance) / S3L_FRACTIONS_PER_UNIT;
|
||||||
|
|
||||||
scene.camera.transform.translation.z =
|
scene.camera.transform.translation.z =
|
||||||
scene.models[1].transform.translation.z - carDirection.z;
|
scene.models[1].transform.translation.z - (carDirection.z * cameraDistance) / S3L_FRACTIONS_PER_UNIT;
|
||||||
|
|
||||||
scene.camera.transform.rotation.y = models[1].transform.rotation.y;
|
scene.camera.transform.rotation.y = models[1].transform.rotation.y;
|
||||||
|
|
||||||
|
|
3
todo.txt
3
todo.txt
|
@ -27,9 +27,6 @@ features:
|
||||||
interpolation -- it will randomly picky one of three values, with greater
|
interpolation -- it will randomly picky one of three values, with greater
|
||||||
probabilities at greater coords
|
probabilities at greater coords
|
||||||
|
|
||||||
- change the default backface culling to the other one (and edit the obj tool
|
|
||||||
accordingly)
|
|
||||||
|
|
||||||
- option to disable baycentric coordinates computing DONE
|
- option to disable baycentric coordinates computing DONE
|
||||||
|
|
||||||
- Z-buffer:
|
- Z-buffer:
|
||||||
|
|
Loading…
Reference in a new issue