I have an object moving in 3 dimensional space with constant speed, there’s a camera following the object. Camera faces the same direction and moves with the same speed as the object.
Then at some point I need to turn the object and its moving direction by 90 degrees, let’s say to the left of the object. The camera must do the same.
What is the (better) way of doing it? I read a bit about local and global spaces. So far I have only used global positions as it felt easier…
Can you please give me some direction on that or even better code sample.
Thanks!
Include more waypoints and fake a curve. Simple, but awkward.
Include a directions to raycast against for corner sections. Assumes you know the structure of your walls, that you have colliders and adds raycasts, making it simple, but costly.