Game Development Community

Collision Responses

by Peter Robinson · in Torque Game Builder · 02/16/2006 (12:42 pm) · 1 replies

I've been trying to port my game from the old EA edition up to the Beta. I've been doing okay with a few bumps here and there until I came to Collision Responses. They seem nice but I haven't been able to find any real documentation on them. Until now I've simply set tags on objects and used the onCollision call back. When two object collide I just check their tags and call the appropriate functions. Now everything by default uses the clamp response. That's okay, but what if I want an object to clamp on some things and bounce on others? And what if I don't want anything at all to happen except for the call back? I guess what I'm asking is, can I get the call back to fire without an automated response?

Here's my situation. I have two objects: a player and a tree. The camera is directly above. Now when the player drives under the tree I want the two to collide so that I can make the tree fade out. But I don't want the player's movement hindered in any way. I've tried every combination of send and recieve imaginable with no success. On the other hand the player might run into a block, in which case the clamp response works fine. So how do I get this to work? Is there some documentation on the new collision responses somewhere that I missed?

-Peter

About the author

A programmer who has been using the Torque2D game engine since the early adopter days. My game is Pirate Code and it can be found at www.circuithive.com. It will be arriving on Steam in 2016.


#1
02/16/2006 (1:12 pm)
I just did a few more tests and the collision call back isn't being called at all unless both objects send and recieve collisions. I should just be able to set the collision call on the tree to (false, true) and I would get a call back without player object ever knowing what happened. I should mention that I had to set the tree to immovable since the tree was being pushed around by the player. Is this a bug?