Game Development Community

Detecting when collision has ended?

by Dave Calabrese · in Torque Game Builder · 03/06/2008 (12:25 pm) · 3 replies

I need a way to determine when collision is no longer occuring with something. Otherwise, my actions continue to occur, as the flag for colliding with the object is still true. I tried using the 'castCollisionList' function, however it did not return anything even with collision callbacks active and send / receive active on both objects.

Anyone have any suggestions on how to detect when a callback ends?

Thanks!
-Dave C.
21-6 Productions

#1
03/06/2008 (12:54 pm)
What exactly is the problem that you are trying to fix? Unless there is a constant force acting on the object, the callback will call once and that is it.

castCollisionList definitely works; did you use echo and getWord?
#2
03/06/2008 (1:06 pm)
I am attempting to determine when a player touches a wall, and when they are not touching the wall, as the player is able to perform a specific action only when they are touching the wall. To do this, I set a variable to true in the 'onCollision' callback - however when they are no longer touching the wall, the variable is still true. So I need to know when they are, and when they are not touching the wall.

Yes, I tried that, however all it returned was a blank line.
#3
03/06/2008 (2:52 pm)
Actually, it looks like the 'Trigger' object already has all this... looks like I should be able to use that.