Game Development Community

Collision Groups/Layers having no effect?

by Brian Carter · in Torque Game Builder · 02/25/2008 (2:42 pm) · 1 replies

I've been playing around with the asteroids tutorial, and I thought I would mess around with the collision fields.

Originally the editor sets:

asteroid - layer 6, group 0, with all the collision layers on, and only collision group 1 on.
players ship - layer 5, group 1, with all the collision layers on, and only collision group 0 on.

Now, if I put the players ship into group 0 with the asteroid it behaves as I expected it to, they pass through each other. However, if I leave the ship in group 1, and the asteroid in group 0, and then turn on collision groups 0 and 1 for both the ship and the asteroid then they still collide. Why?

I thought if I toggled on collision group 0 and 1 then it would still pass through the asteroid. Am I missing something? Is this a bug?

#1
02/25/2008 (2:48 pm)
Nevermind, I just found my mistake - I set the group collision for 0 and 1 on the ship, but only set it for 1 on the asteroid, hence the ship said pass through, but the asteroid said no way! Pretty awesome actually! When I turn off the group collisions for groups 0 and 1 on both objects, even though they are on different levels and groups it then passes through as it should!