Water Explosion Crash
by Henry Todd · in Torque 3D Professional · 05/02/2009 (5:26 pm) · 2 replies
Apparently projectiles with water explosions defined will cause a crash. I'm using the same explosion datablock for regular and water explosions. When only the base explosion is defined, they render properly in and out of water.
Here's the sequence of events according to the debugger.
Checked this with a clean copy of the PhysX demo just to make sure it wasn't related to anything I've done. The rocket launcher crashed on the first shot when the same explosion was defined as the water explosion.
Here's the sequence of events according to the debugger.
projectile.cpp:
void Projectile::explode(const Point3F& p, const Point3F& n, const U32 collideType)
-> if (mDataBlock->waterExplosion && pointInWater(p))
bool Projectile::pointInWater(const Point3F &point)
-> mContainer->findObjects( boundsBox, WaterObjectType, findRouter, &info );
sceneObject.cpp
void Container::findObjects(const Box3F& box, U32 mask, FindCallback callback, void *key)
-> _findWaterAndZoneObjects( box, mask, callback, key );
void Container::_findWaterAndZoneObjects( const Box3F &box, U32 mask, FindCallback callback, void *key )
-> Vector<SceneObject*>::iterator iter = mWaterAndZones.begin();
tVector.h
template<class T> inline typename Vector<T>::iterator Vector<T>::begin()
{
return mArray;
}Checked this with a clean copy of the PhysX demo just to make sure it wasn't related to anything I've done. The rocket launcher crashed on the first shot when the same explosion was defined as the water explosion.
About the author
Associate James Ford
Sickhead Games