- Home /
how to turn a object in a curved way
hi friends,currently am working with flight.i have a script attached below which makes the object to travel to the points given and keeps incrementing to the next way point if target reached and loops back.what i need is that the object(flight)must turn in a curved way to the next target point.code snippet is appreciated.thanks in advace
The system you are talking about is Waypoints : http://www.google.com/search?btnG=1&pws=0&q=unity+waypoints
The motion you are talking about is Banking : http://answers.unity3d.com/questions/10026/first-person-flight-controls.html
http://answers.unity3d.com/questions/315723/flight-movement-with-banking.html
http://answers.unity3d.com/questions/147483/midair-strafing.html
Good Luck =]
Answer by sparkzbarca · Nov 10, 2012 at 08:49 AM
at each point when you arrive
transform.lookat(nextpoint)
if you'd like to smoothly rotate
transform.rotatetowards(current,target) or basically
transform.rotatetowards(transform.rotation.eulerangles, next_way_point.transform.position);
Your answer
Follow this Question
Related Questions
how to move an object in a curved way 4 Answers
how to rotate one piece and make another move linearly? 0 Answers
iTween for Dynamically Moving Objects around a Sphere 0 Answers
[C#] Movement Direction Change 2 Answers
Itween for curved orbital movement? 1 Answer