- Home /
how to apply a force in direction of object is facing?
this relates to train question
I am building a simulator for pieces of track so a sphere will move within and follow track shape any answers
Comment
Answer by duck · Apr 07, 2010 at 02:36 PM
To apply a force in the object's own forward direction, you can use the transform.forward variable, like this:
AddForce( transform.forward * forceAmount );
However, this alone won't necessarily keep your object on its tracks!
still got the same problem box or sphere hits angled track and slows down.
How much does it slow? That might just be realistic physics, because trains normally do slow down at curves.