Game Development Community

Collision Detection In Beta 3

by David Taylor · in Torque Game Builder · 05/29/2006 (9:36 pm) · 5 replies

I'm trying to get two objects to collide in Beta 3. I've added two sprites to the scene in the editor, set their collision layers and groups to the same as each other, ticked send collision, receive collision and callback on each of their collision tabs, set both of the collision layers and collision groups to 0 (their own layers and groups), and yet, when they visibly touch, there is no collision whatsoever.

Does anyone know what I've missed here?

#1
05/30/2006 (12:10 am)
What do you have in the callback code? If you haven't scripted anything to happen in the callback, then nothing will.
#2
05/30/2006 (6:34 am)
Did you push the buttons for the layer and groups? If you did I THINK you de-activated collision with those groups... it seems that all layers and groups are activated for all objects by default which is quite confusing.
#3
05/30/2006 (4:38 pm)
Also there is a bug: you have to create the custom collision polygon in clockwise direction- the collision code can't handle it if the polygon is created in counter clockwise direction (even if created in the level builder)
#4
05/30/2006 (9:16 pm)
Ah, that was the problem. I was unknowingly turning the collision off! Haha! Thanks to all of you, particularly Oliver, who spotted the problem. And you're right - that's really confusing... :/
#5
05/31/2006 (4:40 am)
@Alex,

In my collision problems, I checked the polygon orientation and tested both cw and ccw. It didn't really change the behaviour of the collision bugs.