Game Development Community

Do mounted objects have collision?

by Tyler Slabinski · in Torque Game Engine · 12/03/2009 (7:39 pm) · 3 replies

I was going to see if I could do this, but I was not sure if it is possible.

Do mounted objects have collision? I was going to use one of the many door resources when a thought occured to me... Animations may not have collision, but what about mounts? I could make a door hinge out of an armature, and then mount the actual door onto the hinges like normal. I doubt that I would be able to do this, but I would rather use something that I know rather than make code changes and learn how to make another set of objects. I will use a resource if I need to, but I am going to look at possibilities first.

#1
12/03/2009 (8:18 pm)
If by collision you mean the mounted object will push things out of the way, no. But I think you'll probably be able to collide against the mounted object fairly correctly at whatever orientation it's currently at.
#2
12/04/2009 (11:47 pm)
if the mounted object is a datablock with an ID or class name you could do an onCollision function for it and script from that event correct?
#3
12/05/2009 (5:25 am)
The problem is that onCollision is only called when other objects collide with the object in question. So if a player ran into a door, the door's onCollision method would be called, but if the door swung into the player, there's no callback anywhere.