Game Development Community

Cannot dismount from car

by Jules · in Torque Game Engine · 07/04/2007 (3:03 am) · 3 replies

I'm having a problem where I cannot see where I am going wrong with dismounting a vehicle. When I try to exit from the vehicle it just rotates the car, you then see a different camera view every time I do a ctrl x. Any suggestions? It's probably a simple fix, and looking for it until 3am did not help :(

#1
07/04/2007 (3:29 am)
This usually happens, I think, when two triggers are being called at once. By default trigger 2 is used to trigger jumping on the player OR the handbrake of a car. If a player is mounted in the vehicle and the vehicle isn't the main control object, and the handbrake isn't assigned in script then you'll see the results that you're describing.

Either modify your dismount function or do what I did and shift the handbrake trigger, in source, to trigger 4 (3 is usually reserved for jetting/energy boost).
#2
07/04/2007 (4:05 am)
Thanks Tim... I'll have another look :)
#3
07/04/2007 (4:29 am)
I'm just guessing on what the cause is here. I have in fact seen this problem before and rectified it through script only so if you can't work anything out let me know and I'll see if I can help. It would be helpful if you could post your dismounting script.

Either way, if you want a player to be able to mount a vehicle and include a handbrake you're going to have to shift the handbrake trigger in the wheeledVehicle source code (easy one line job).