- Home /
Question by
Kuritho · May 07, 2018 at 10:32 PM ·
movementvector3charactercontrollervelocity
How to keep velocity and add onto it from any rotation.
I'm trying to make a movement system and I need some guidance on how to have a Vector3 that can add onto another one, with rotation accounted for. Example: If I am moving forward on the X axis at 1 m/s and look up, I still want to move forward on the X axis 1 m/s, and then I want to be able to look in a different direction and be able to move there, while still having all the normal velocity. Found Answer: https://answers.unity.com/questions/46770/rotate-a-vector3-direction.html
Comment
Answer by Xavier78 · May 08, 2018 at 02:05 AM
I would have your camera as a child object of the one getting the velocity applied. Either that or you can look into using global position, so your rotation doesn't effect it.