E
E
Eduard072018-12-06 14:54:01
three.js
Eduard07, 2018-12-06 14:54:01

3D / three.js vertical movement formula?

Hello everyone, I had such a problem, I need a formula for the movement of the vertical movement of the camera.
Horizontally I was found on the internet vertically no, I hope you can help.
Horizontal:
right...
where x and z is the camera position
camera.position.x = x * Math.cos(rotSpeed) - z * Math.sin(rotSpeed);
camera.position.z = z * Math.cos(rotSpeed) + x * Math.sin(rotSpeed);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question