Collisions with Bones = Crash
by Logan Foster · in Torque Game Engine Advanced · 05/08/2006 (2:18 pm) · 9 replies
Using TSE MS3 here and have encountered an interesting issue that once existed in TGE with regards to bones, collisions and TSShapes that creates a crash.
Essentially what is happening here is that whenever TSE detects a collision (ie. player collision with the shape or a raycast collision) on a bone that is in a shape, but not enclosed by an objects geometry, the application will crash out to the desktop with an error. Which is very similar to an issue that GG/Bravetree found with TGE long ago.
The crash seems to happen when the engine is stepping through the SubShapes, it cannot find the transform of the previous sub-shape and errors out.
So why do I assume that this is a bug related to bones (not biped)? Simple answer is that if one removes the bones that are driving the deformation in the Static DTS shape, a crash no longer occurs. Although this is a work-around solution its not technicly the solution we want to use in the longterm.
Thoughts, questions and/or comments?
Essentially what is happening here is that whenever TSE detects a collision (ie. player collision with the shape or a raycast collision) on a bone that is in a shape, but not enclosed by an objects geometry, the application will crash out to the desktop with an error. Which is very similar to an issue that GG/Bravetree found with TGE long ago.
The crash seems to happen when the engine is stepping through the SubShapes, it cannot find the transform of the previous sub-shape and errors out.
So why do I assume that this is a bug related to bones (not biped)? Simple answer is that if one removes the bones that are driving the deformation in the Static DTS shape, a crash no longer occurs. Although this is a work-around solution its not technicly the solution we want to use in the longterm.
Thoughts, questions and/or comments?
About the author
#2
05/08/2006 (8:28 pm)
We had a similar problem with a an animated flag shape. Every time we collided it would crash. Never found a fix, wound up using our smaller unanimated flags for CTF as a workaround.
#3
06/02/2006 (12:02 pm)
If someone has an example shape they can send me, I'll check it out.
#4
06/02/2006 (3:12 pm)
Sending a sample file over to you now Brian.
#5
06/02/2006 (3:56 pm)
Sending a sample file over to you now Brian.
#6
in tsCollision, change line 161 and line 245 to:
if (mesh->getTransform() && mesh->getTransform() != previousMat)
06/12/2006 (5:47 pm)
I sent a fix to Logan, but I haven't heard back from him, if someone with this problem could confirm that this fix works, it would be good.in tsCollision, change line 161 and line 245 to:
if (mesh->getTransform() && mesh->getTransform() != previousMat)
#7
Seems as if Logan forgot to report this back to you. He send me the fix to test with our current project and we immediately verified, that it works fine.
The flag no more causes a crash, when crossing the line of a rayCast().
One thing I would like to ask:
Your changes are preventing bones to be taken into account during the rayCast() code.
But isn't there another problem elsewhere, that bones are appearing as submeshes?
I guess this could lead to problems with other engine code, or am I wrong on this?
Thanks again for the fix.
-- Markus
06/12/2006 (10:34 pm)
Hi Brian.Seems as if Logan forgot to report this back to you. He send me the fix to test with our current project and we immediately verified, that it works fine.
The flag no more causes a crash, when crossing the line of a rayCast().
One thing I would like to ask:
Your changes are preventing bones to be taken into account during the rayCast() code.
But isn't there another problem elsewhere, that bones are appearing as submeshes?
I guess this could lead to problems with other engine code, or am I wrong on this?
Thanks again for the fix.
-- Markus
#8
06/13/2006 (10:43 am)
Yeah, just checked TGE code and it looks like it's been addressed a bit further than my change. I'll merge the recent updates from there.
#9
Recently did a little test using tank pack in TSE and it crashed when shooting other tanks. Just as a little fun test, and I didnt pursue the issue.
Will apply the above fix and see if that solves it + report back
06/14/2006 (1:22 am)
Oh - missed this one.Recently did a little test using tank pack in TSE and it crashed when shooting other tanks. Just as a little fun test, and I didnt pursue the issue.
Will apply the above fix and see if that solves it + report back
Associate Logan Foster
perPixel Studios