Hi guys, thanks for reading my question, I hope you could give me a hand with this...
The thing is, I'm kinda unsure of a way how to make my objects "turn smoothly" when they have to move towards a different direction that they are facing...
Basically, I created my own little waypoints system for a Rail-shooter game, where you move along a path. It works well and good, and events trigger well. But at this point in time, what I do to transition from heading to another waypoint is to turn towards the next waypoint point and move forward, which results in... Move to point, turn, move to next point. What I want to do is to change that into a starting moving towards point, turn slowly as it approaches the next point so that it will curve towards the next point, and continue heading straight for the next point... So that the turning will look more realistic of sorts.
Could anyone give me a hand with that?
asked Oct 26 '10 at 04:01 PM
You can interpolate a rotation by using Quaternion.Slerp. For example
I'm sorry but I can't test this code because currently I'm not using my own PC.
answered Oct 26 '10 at 07:36 PM