Get velocity of player camera manager for speedometer

Hi,

I’m trying to make a speedometer and so I’ve been trying to get the speed of the camera. I’ve seen that when I play the game the coordinates of the player camera manager change so it must have a velocity. What is wrong with what I have in the images?

Thank you!

get velocity is for stuff that’s simulating physics, and I think it may work with a movement component. you can get the velocity by comparing the change in camera’s location. something like a looping timer that saves the camera’s current and previous locations to variables and then divide the distance between locations by the timers ‘time’.

or you could derive the camera’s velocity based on the whatever is moving the camera.