Game Development Community

where i can find Car Collision mount function?

by Enel · in Torque 3D Professional · 08/17/2009 (10:10 am) · 3 replies

i dont find where is..

car.cs

function WheeledVehicleData::onCollision(%this,%obj,%col,%vec,%speed)
{
// Collision with other objects, including items
}

it is not anyting act but player has mounted when collide car.


where i find about collision mount attribute?..

#1
08/17/2009 (10:15 am)
If you are looking at the FPS Genre Kit, try mounting the vehicle using the E key.

If you've generated a project from the Full template, then see the function PLAYERDATA::onCollision to see how the player is mounted onto the vehicle. So its being checked on player collision, not vehicle collision.
#2
08/17/2009 (10:17 am)
oh.. my mistake.. i didnt see playerData:onCollision

Thx..
#3
08/17/2009 (3:03 pm)
Yep, FPS kit uses the "e" key to mount a vehicle within range. The Template uses the old standard of run into into it (PlayerData::onCollision) and mount.

The FPS kit also has a more extensive set of vehicle related script methods that can be useful.