Steve_Yorkshire Posted May 5, 2021 Share Posted May 5, 2021 So, I've been playing around with explosions, player.blowUp(), etc and noticed the info in InitPersistant fields is a bit ... out of date and not very helpful. Here's what it says: addGroup( "Destruction", "Parameters related to the destruction effects of this object." ); addField( "explosion", TYPEID< ExplosionData >(), Offset(explosion, ShapeBaseData), "%Explosion to generate when this shape is blown up." ); addField( "underwaterExplosion", TYPEID< ExplosionData >(), Offset(underwaterExplosion, ShapeBaseData), "%Explosion to generate when this shape is blown up underwater." ); addField( "debris", TYPEID< DebrisData >(), Offset(debris, ShapeBaseData), "%Debris to generate when this shape is blown up." ); addField( "renderWhenDestroyed", TypeBool, Offset(renderWhenDestroyed, ShapeBaseData), "Whether to render the shape when it is in the \"Destroyed\" damage state." ); addField( "debrisShapeName", TypeShapeFilename, Offset(debrisShapeName, ShapeBaseData), "The DTS or DAE model to use for auto-generated breakups. @note may not be functional." ); endGroup( "Destruction" ); And we should be looking at "debris" line ~607-608 and "debrisShapeName" line ~611-612. "@note may not be functional." is the clue here as auto-generated breakups are a thing of the past. What actually happens is your debris model is a collection of mesh objects (with LODs) which are each centred on origin (or else they spin weird because origin is the spin point). "debrisShapeName" the dae/dts file that you have debris mesh objects in. "debris" needs to point to a datablock of "debrisData" to derive velcoity, spin, particles and other data from for "debrisShapeName" - NOTE: if this datablock has a shapefile mentioned then it will override the "debrisShapeName". HOWEVER: if there is no "debrisShapeFile" then NOTHING WILL SPAWN regardless of whether "debrisData" has a shapeFile. And without "debris" pointing to a "debrisData" nothing will spawn because no number of debris has been set. So, maybe change "debris" info (line ~608) to say something like: Quote "%Debris datablock to generate debris data. ShapeFile will override debrisShapeName."); And "debrisShapeName" info (line ~ 612) to say something like: Quote The DTS or DAE model to use for debris. Must be set regardless of debrisData's shapeFile setting."); Anyhow, just muh thoughts in clearing up the outdated info. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.