10-08-2016, 04:16 AM
Im working on a racing game, where the user is not allowed to go left or right, being solely dependent on the trajectory of the spline. I am currently applying a force to the rigidbody of the car but the car doesnt seem to be following the trajectory in a very precise way. After two/three turns into the race, the car is already far from the spline.
I am familiar RigidBodySplineController, however, this example was made very much with the geometry of the track itself in mind, and the "pull towards the center" doesnt work well in my case. I tried various combinations but at best I have a very non-natural movement.
Having previously used velocity with a simple spline controller, I am sure that the issue with tangent/direction changing all the time is something manageable but am having a very tough time figuring out how to have the exact same behavior with forces.
Please let me know if you could help me with figuring this issue out as im sure a lot of users have bumped into this issue. I also have the feeling that I may be overcomplicating things and am missing something obvious.
Thank you
Cezar
I am familiar RigidBodySplineController, however, this example was made very much with the geometry of the track itself in mind, and the "pull towards the center" doesnt work well in my case. I tried various combinations but at best I have a very non-natural movement.
Having previously used velocity with a simple spline controller, I am sure that the issue with tangent/direction changing all the time is something manageable but am having a very tough time figuring out how to have the exact same behavior with forces.
Please let me know if you could help me with figuring this issue out as im sure a lot of users have bumped into this issue. I also have the feeling that I may be overcomplicating things and am missing something obvious.
Thank you
Cezar