- Home /
What is the difference between gameobject movement speed by velocity and calculating the speed with deltatime and magnitude ?
This is how i'm getting the camera movement speed in the Update:
cameraSpeed = (cameras[currentCamera].transform.position - lastCameraPosition[currentCamera]).magnitude / Time.deltaTime;
cameraSpeed is float
But when i make:
cameras[0].velocity;
cameras is array type Camera I see on velocity: Get the world-space speed of the camera (Read Only)
I wonder then why not to use velocity to get and display the camera movement speed ? And if it's needed i will add a Rigidbody to the camera then use the velocity i just wonder what is better or what should i use to get and display as the camera movement speed ?
Answer by TheSOULDev · Aug 25, 2017 at 11:52 PM
I don't really understand why you would want to display the speed of the camera, but applying the rigidbody to the camera and displaying the cameras[i].velocity.magnitude is about the easiest way you can do it.
Your answer
Follow this Question
Related Questions
how to rotate velocity/ tying movement to camera 0 Answers
*Please help, my first person camera goes all over the place after enabling weapon collider* 0 Answers
How can I switch between two cameras ? 1 Answer
How to move a camera combination of x and y axis 0 Answers
Displaying the y value score,Displaying the score of the Y value 1 Answer