- Home /
Camera X and Y velocity HELP!
Hey Guys :) I am making a weapon movement, but i not know how to "pick up" the câmera velocity when he moves on cord. X and Y. Thanks :)
Could you clarify a little? I can't make sense of your description.
Are you trying to get the velocity of the camera's position? If so, you could use a pretty simple comparison of the current camera position compared to the last camera position.
Something like this perhaps??
function Start() { lastCameraPosition = Camera.main.transform.position; }
function Update() { cameraSpeed = (Camera.main.transform.position - lastCameraPosition)/Time.deltaTime; lastCameraPosition = Camera.main.transform.position; }
i am trying to get the velocity of the camera rotation xD Sorry for my english xD
But try to understand me, i am trying to with the camera velocity make the weapon have a smooth follow...