Game Development Community

Bug in Interior::getIntersectingHulls?

by Neil Marshall · in Torque Game Engine · 04/21/2006 (1:19 pm) · 0 replies

I've run into a weird problem in interiorCollision.cc and I'm wondering if it's a bug in the engine. For some reason with my project, the asserts stop my code.

AssertFatal(endX <= NumCoordBins, "Error, bad endX");
   AssertFatal(endY <= NumCoordBins, "Error, bad endY");

But in the Torque Demo it doesn't assert. So I looked at the code behind endX and endY only to find that there always seems to be a divide by 0 happening.

S32 endX   = S32( mCeil((queryMaxX - mBoundingBox.min.x) / xBinSize));
   S32 endY   = S32( mCeil((queryMaxY - mBoundingBox.min.y) / yBinSize));

But yBinSize and xBinSize always appear to be 0. Am I just not writing them to the console properly or is there something more going on here?

See www.garagegames.com/mg/forums/result.thread.php?qt=43170 for more.