Keeping track of vehicles on a track
by BigPapa · in Torque Game Engine · 07/08/2005 (10:26 pm) · 2 replies
If you have played with the starter.racing kit, you know that if you flip your car and reset it, you end up back in the starting line. I'm trying to reset the car in the last place on the track where it was before it flips or bounces out of the track.
I figured the easiest way would be by using triggers along the path of the track. Every time a trigger is tripped, the transform of the trigger is saved on a variable in the Vehicle Datablock.
I already accomplished this. Now I need to come up with a way to extract that variable from the vehicle datablock and pass it to the reset function so that the car is placed in the center of the last trigger that it entered.
Has anybody done anything like this or has a better idea of how to accomplish this?
Thx!
I figured the easiest way would be by using triggers along the path of the track. Every time a trigger is tripped, the transform of the trigger is saved on a variable in the Vehicle Datablock.
I already accomplished this. Now I need to come up with a way to extract that variable from the vehicle datablock and pass it to the reset function so that the car is placed in the center of the last trigger that it entered.
Has anybody done anything like this or has a better idea of how to accomplish this?
Thx!
Torque Owner BigPapa
I just have to work out some bugs but it works pretty well for the most part.