Collision Help
by Ryan Dixon · in Torque Developer Network · 03/28/2010 (2:02 pm) · 1 replies
I am trying to get my missile and enemy ship to collide and delete each other, but no nluck. I am also using the shoots behaviour. My code is in my enemy.cs file. Can'e see what im doing wrong, please help!
function EnemyShip::onCollision( %this, %srcObj, %dstObj, %srcRef, %dstRef, %time, %normal, %contactCount, %contacts )
{
if (%dstObj.class $= "pMissile") {
%srcObj.safeDelete();
%dstObj.safeDelete();
}
}
function EnemyShip::onCollision( %this, %srcObj, %dstObj, %srcRef, %dstRef, %time, %normal, %contactCount, %contacts )
{
if (%dstObj.class $= "pMissile") {
%srcObj.safeDelete();
%dstObj.safeDelete();
}
}
About the author
Torque 3D Owner RealmX