Game Development Community

Can't get onCollision to work

by T. John Laird · in Technical Issues · 10/30/2007 (11:24 am) · 1 replies

I'm trying to get the onCollision callback in car.cs to work and not having any luck. When I hit objects above 15mph and check the console I get nothing. Here is my function:

function WheeledVehicleData::onCollision(%this,%obj,%col,%vec,%speed)
{
echo("A collision has occured with object " %obj ".");
}

Any ideas on how to fix it please?

#1
10/30/2007 (1:04 pm)
Try:

Echo("A collision has occured with object:" spc %obj @ ".");