Game Development Community

Manager mObjBox and mWorldBox

by James Spellman · in Torque Game Engine · 11/10/2005 (9:38 am) · 3 replies

Can anyone explain to me why the various manager objects have these properties set like:

mObjBox.min.set(-1e7, -1e7, -1e7);
mObjBox.max.set( 1e7, 1e7, 1e7);
mWorldBox.min.set(-1e7, -1e7, -1e7);
mWorldBox.max.set( 1e7, 1e7, 1e7);

I had just noticed that a manager I added was hitting code in getBinRange that the other managers were missing.

#1
11/10/2005 (9:42 am)
Manager objects?

It's basically just to make them render "all the time" - there's a new feature in 1.4, setGlobalBounds() that is a more robust way of accomplishing this.
#2
11/10/2005 (2:36 pm)
1.4 will save us all! :)

I was thinking specifically of the DecalManager class when I spoke of managers collectively. I have several asset Managers that function like it. There's also various special render-type classes such as the FoliageReplicator, Precipitation, etc. that are either larger than a breadbox or deal with complex systems that I would consider to be manahers.

Anyway, my latest issue is that I've got some content developers who are crashing because of Bad minCoord or Bad maxCoord in getBinRange and I am at a loss to explain it. It seems to happen mainly during mission lighting, but only happens about 80% of the time and naturally doesn't happen on any of my development machines. I was hoping that fixing those boxes would help but to no avail.
#3
11/10/2005 (8:35 pm)
That sort of issue often results from a NaN in a matrix causing a non-sensical bounding box. You might try adding an assert in there to make sure that you're not pushing a NaN in somewhere.