Game Development Community

Switching seats when mounted in a vehicle

by Mike Stoddart · in Torque Game Engine · 09/05/2002 (8:17 am) · 1 replies

I have successfully modified the code to allow my player to be mounted to a vehicle, which I can drive ok. I also have the core code for handling extra seats, including locating the next and previous seats when switching. I've added a vehicleMap so that when you're in the vehicle (in any seat), you can only use a subset of the usual keys.

Unfortunately, something is amiss. When I switch seats and then exit, some of the controls don't work, such as fire and reload.

Currently, when I'm switching seats, I do an unmount() followed by a mountObject(). Is this necessary? Is there a way to just modify the mMount.node variable in the ShapeBase object and then get the engine to "refresh" the player?

Thanks

#1
09/05/2002 (10:23 am)
You need to make sure you're updating the Controlling Object, which when you mount to driver is set to the vehicle. So you prolly need to make adjustments there