- Home /
Vehicle follow a path by input - Bike Simulator
I am developing a bike simulator. The player will not be able to drive the bike, just will pedaling the bike through the scenario. How can I make the bike follow a path while the player is pedaling/accelerating? Is it possible to make curves and lean the bike in this path also?
Tks
Answer by Itinerant · Jul 16, 2012 at 08:17 PM
Not the only way to do it I'm sure, but you could set the motion using 3dsMax path animation tool or whatever modeling/animation software you're using. Then import that animation into your game, and use the animation speed adjustment method to adjust the rate at which you want them to go. Leans and things like that could be built into that animation, or they could be sub-animations as children beneath the parent animation moving along the path.
http://docs.unity3d.com/Documentation/ScriptReference/Animation.Index_operator.html
Answer by Ingen · Jul 16, 2012 at 09:48 PM
I think this is very very helpful for you
http://whydoidoit.com/2012/04/06/unity-curved-path-following-with-easing/
Answer by rodrigozol · Jul 17, 2012 at 12:42 PM
Tks. I'll try the ideias and also NavMesh. As the bike moves by a torque in a wheel collider, just like a car, I don't know if the approach using a animation will work. I'll see.
Your answer
![](https://koobas.hobune.stream/wayback/20220613074248im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Object following the path 3 Answers
Follow curved path with dynamic speed 2 Answers
Selectable Paths 1 Answer
object follow a spline path 1 Answer