Game Development Community

1.7.4 Collision Groups/Layers

by Deozaan · in Torque Game Builder · 08/15/2008 (10:49 pm) · 2 replies

I made the mistake of clicking "None" for collision groups and layers in the Editor and now no matter what I do I can't get the object to collide with anything.

I click "All" to enable all groups/layers and they highlight blue as if they're enabled, but when I run the scene the object does not collide, and when I restart the TGB editor (full close/reopen) they are all disabled again for this object. Even if I save the file manually, when I close the editor (clicking yes to save the scene from the prompt) and open up the editor and scene again, all collision groups and layers are disabled for that object.

How can I fix this and re-enabled collisions for this object?

#1
08/16/2008 (12:28 am)
I cannot diagnose engine errors but just to double check this isn't somehow user error, do you have a behavior on this object or callback (onLevelLoaded?) that could be resetting the collision settings? Have you looked at your level file to verify what the collision settings are on your object in the file and that the file is being modified when you save? I have seen issues where TGB saves or opens a level file for the wrong project. Another possibility, do you have a config datablock assigned to this object that could be overriding your collision settings?
#2
08/16/2008 (8:18 am)
The object currently has the DealsDamage behavior, which was on it and working properly before I clicked "None"

I got it to collide again by enabling all but one of the collision groups/layers. But then it was sending physics (making other objects clamp/etc) when I wanted them to pass through it, so in the end I finally just mounted a trigger to the object that deals the damage and allows other objects to pass through.

But I think there's still an engine bug where if you click "None" for collision groups/layers and then click "All" it doesn't save the "All" part. I even tried to overwrite the file with Save As... and it always defaulted the groups/layers to none for that one object I clicked "None" for.