Game Development Community

GameBase::BoundingBox

by Juan Aramburu · in Torque Game Engine · 06/10/2006 (2:00 am) · 3 replies

Get this error when setting it to true (debug exe):

Can't get a lock with the end before the start.

engine/gfx/gfxvertexbuffer.h @ 70

Resolution?

#1
06/14/2006 (5:50 pm)
Bump.
#2
06/14/2006 (6:04 pm)
A resolution?

Don't set it to true.

But that's probably not what you want?
Why do you want to set this value? Do you even know what it's supposed to do? Have checked the code?
This field when set should rendering the box used to query for collisions. Not sure why you would want to render this...

Have you searched for boundingBox in gameBase.cc ? A search in the project for gShowBoundingBox shows that different objects are responsible for rendering their own bounding box.

Look for the if(gShowBoundingBox) part of the rendering code and cut and paste the rendering to before the dglSetCanonicalState(); and that (as far as I can tell) will fix your problem.

- Eric
#3
06/15/2006 (5:56 pm)
If you have TSE & access to the TSE forums: http://www.garagegames.com/mg/forums/result.thread.php?qt=45446

My problem is that we have a flying/wheeled vehicle that, once colliding with terrain seems to crash TSE (or substantially use all CPU cycles for a couple of seconds). Did a little researching and it's something about the bounding box, and then discovered the $GameBase::BoundingBox variable. Thought it would at least help out somewhat in figuring out our main problem.

Problem is, setting it to true works if our model isn't in the mission (as it'll show the white/glowing outline for things like health and ammo) but once we add our model to the mission, that assert kicks in. The model is an airplane.

I will try out your solution.