Vehicle Direction still a problem
by DNADMG · in Torque Game Engine · 03/24/2006 (3:15 pm) · 0 replies
Hello again.. I still have not quite figured out how to solve my vehicle direction problem... I need to keep the vehicle faced forward down the track .
I have put triggers onto the track everytime there is a significant change in direction, and then send the trigger.getForwardVector() to the engine to compare to the vehicles current forward vector. The angle difference should trigger the clamp in rotation. I have it working so that I knows when it is turned the wrong direction ( .5 radians off the trigger forward vector) , but I am having problems figuring out how to prevent the vehicle from rotating outside of those bounds..
I have tried having rigid.cc do it in the integrate function but I cant get it to work correctly.
Does anyone have any suggestions/ideas for me to try, so that I can get this vehicle to only move forward down the track?
Thanks in advance.
aryn.
I have put triggers onto the track everytime there is a significant change in direction, and then send the trigger.getForwardVector() to the engine to compare to the vehicles current forward vector. The angle difference should trigger the clamp in rotation. I have it working so that I knows when it is turned the wrong direction ( .5 radians off the trigger forward vector) , but I am having problems figuring out how to prevent the vehicle from rotating outside of those bounds..
I have tried having rigid.cc do it in the integrate function but I cant get it to work correctly.
Does anyone have any suggestions/ideas for me to try, so that I can get this vehicle to only move forward down the track?
Thanks in advance.
aryn.
About the author