TGEA 1.7.0 Beta 1 Bug - debris and bad boxes
by Kirk Longendyke · in Torque Game Engine Advanced · 03/28/2008 (11:27 am) · 0 replies
This one takes a bit of scource modification, so wouldn't show up in normal testing, but:
there seems to be an underlying bug with the mObjBox allocation when mounting one destructable object onto another and destroying it. Quichack fix, is to toss in:
not real sure if theres anything *stock* that uses it in that manner, but does royally play havoc with the turret-mounting rescource.
there seems to be an underlying bug with the mObjBox allocation when mounting one destructable object onto another and destroying it. Quichack fix, is to toss in:
bool Debris::onAdd()
{
...
if( mDataBlock->shape )
{
mShape = new TSShapeInstance( mDataBlock->shape, true);
}
if( mPart )
{
// use half radius becuase we want debris to stick in ground
mRadius = mPart->getRadius() * 0.5;
mObjBox = mPart->getBounds();
}
if (!mObjBox.isValidBox()) mObjBox = Box3F(-1, -1, -1, 1, 1, 1); //lockup prevention for oddball cases
resetWorldBox();
mInitialTrans = getTransform();
...
}not real sure if theres anything *stock* that uses it in that manner, but does royally play havoc with the turret-mounting rescource.