Render collision mesh debugging mode?
by Clint S. Brewer · in Torque Game Engine · 01/20/2005 (4:37 pm) · 8 replies
Is there a debugging mode to render collision meshes in TGE for dts objects? I didn't see anything in particular in the code but maybe I'm missing something.
thanks.
thanks.
About the author
Recent Threads
#2
01/20/2005 (11:58 pm)
Unfortunately I've run into problems already where the collision meshes look just fine in TST pro but are not correct in TGE, or at least don't behave correctly, so I can't trust TST pro. I sent mail to David about this a few days ago but haven't heard back yet. I should still have one of the problem models in perforce.
#3
Not sure that is possible unless the collision meshes aren't closed, convex volumes. What is the "bad" behavior?
01/21/2005 (12:38 am)
Quote:
the collision meshes look just fine in TST pro but are not correct in TGE, or at least don't behave correctly
Not sure that is possible unless the collision meshes aren't closed, convex volumes. What is the "bad" behavior?
#4
my theory is that the transform on the collision mesh was screwy enough that TGE didn't handle it but TST being all fancy pants knew where to put that little collision mesh. I fixed it by deleting the box, recreating it in the top viewport in 3ds max, then all was fine.
here's the mail I sent to David with more of a description
01/21/2005 (1:44 am)
Quote:Not sure that is possible.....What is the "bad" behavior?you can run right through where the collision mesh should be. It was just a simple box if I recall correctly, couldn't have been an open or non convex mesh. well anything is possible :)
my theory is that the transform on the collision mesh was screwy enough that TGE didn't handle it but TST being all fancy pants knew where to put that little collision mesh. I fixed it by deleting the box, recreating it in the top viewport in 3ds max, then all was fine.
here's the mail I sent to David with more of a description
Quote:
I ran into an issue with the demo a week or so ago that I keep meaning to tell you about.
I had a model that looked like the collision mesh was fine in 3dsmax, loaded it in TGE and it seemed wrong, I could walk right through my object but would collide with something off to the side.
thought hmm maybe that TST demo will help out here, loaded my DTS and the collision mesh also looked just fine, just like it did in 3ds max.
eventually I found that I had created my collision mesh in some viewport that gave me an odd base transform. I recreated it in the top viewport so that it matched the transform of the bounds and then things worked fine.
#5
01/21/2005 (2:23 am)
Odd...maybe the collision mesh was being animated inadvertly? TST Pro would likely show it in the animated position while the engine wouldn't collide against it at the animated transform (can't animate collision hulls).
#6
01/21/2005 (1:37 pm)
Possible, but I don't think so. it was just a static mesh, no sequences in the file that I knew of. If anyone wants to take a closer look I can dig up an old version of the file from perforce.
#7
So, "You can also get them to show in-game by abusing TS a little bit" sounds great, but I'd appreciate just a slight more concise pointer than that :-)
10/15/2006 (8:56 pm)
I'd really like to have this feature in the actual game. Being able to visualize the collision mesh moving around is very useful (it's like the first function I add when integrating some new physics in other engines).So, "You can also get them to show in-game by abusing TS a little bit" sounds great, but I'd appreciate just a slight more concise pointer than that :-)
#8
Only works in debug mode.
10/15/2006 (9:37 pm)
OK, here's how to render collision meshes:$GameBase::boundingBox = true;
Only works in debug mode.
Associate Kyle Carter