Game Development Community

Multiple Building Damaged state and Collision

by AIS-RR (#0001) · in Torque Game Engine Advanced · 02/25/2008 (5:22 pm) · 6 replies

We currently implemented damaged building states by having multiple building meshes in a dts and an animation track that animates the visible flag on each of the mesh so only one mesh is visible at any one time. We also have some collision meshes (col-1 and col-2) which match the prestine building mesh. How can we have multiple collision meshes that match the other building meshes? Is there a way to turn off the collision mesh maybe through the same visible flag in the animation track?

#1
02/26/2008 (9:31 pm)
SetCollisionTimeout ?
#2
02/27/2008 (11:14 am)
I looked at SetCollisionTimeout and that is only used for Items. The building states is a staticShape. Thanks anyways.
#3
02/28/2008 (7:13 pm)
So i sorta solved this by adding a script command to disable/enable certain col-X. So, in script i'm able to say: %obj.disableCollisionDetail(1) which would remove col-1 from collisions. I'm probably going to expand it so that i can either remove collision from rays or players.
#4
02/29/2008 (1:20 am)
Hi!


I've been looking forward to implementing such functionality my self, just haven't gotten around to it yet. Care to share you implementation :D ?
#5
03/06/2008 (9:12 am)
Henri, each sceneobject has its enableCollision/disableCollision methods.
I think it is very easy to write a SetCollisionTimeout method for each class.
#6
03/06/2008 (11:30 am)
@Picasso


Yeah, I'll look into it once I get the time, I bet it shouldn't be too difficult to disable/enable specific collission meshes on demand -- I was just hoping to shave a few hours off from coding and code browsing :D