- Home /
How do i make a flowing 90 degree turn?
Hey guys im writing a script for car AI. It is suppose to driving and follow the road. Any corners it comes to have colliders at each end. The first collider tells the car to turn by so much and then straiten out once it hits the second collider. How it turns isn't just simple rotation though. The wheels pulling the car turn themselves rather than just rotating the car. I know how to find the center point for the 90 degree turn but what I can't figure out is how to make the car turn around it to make it flow like its actually driving. Right now its closer to a drunk driver XD
The problem is that I can't figure out how to write the code exactly.
There are countless tutorials out there, like this one: http://www.youtube.com/watch?v=c5Snsi68xzE
I couldn't find what i was looking for in that tutorial and i can't seem to find one that answers it.
"Like this one" suggest there are tutorials on how to make car games or car controllers. You can search for them, if you don't know how to code you can use snippets from those tutorials. I didn't post that video to answer your specific question, I sent it to show that there are many kind of tutorials.
In the worst case you can use iTween for a smooth transition.
Answer by Tanshaydar · Sep 16, 2013 at 09:26 PM
You can turn the car a few degrees at a time or use character controller you used for player controlled car to turn it.