Game Development Community

Callback for collision within a scene

by Gavin Beard · in Torque Game Builder · 02/15/2009 (4:38 pm) · 2 replies

Hi all

Is there a callback or function that can be triggered if a collision takes place within a scene? I've tried using scenewindow2d::oncollision() with no luck.

what i'm trying for is a way to perform some whichs with different objects in a scene but only want to do any of the checks if a collision has taken place anywhere within the scene?

thanks in advance

#1
02/15/2009 (5:22 pm)
I think you are looking for this one:

function t2dSceneObject::onCollision(%this, %dstObj, %srcRef, %dstRef, %time, %normal, %contactCount, %contacts)
{
}
#2
02/15/2009 (5:27 pm)
worked great, thanks alot :-)