Jump to content

Debris Info In ShapeBase.cpp Could Do With Being Updated For BlowUp() Function


Recommended Posts

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:


"%Debris datablock to generate debris data. ShapeFile will override debrisShapeName.");

And "debrisShapeName" info (line ~ 612) to say something like:


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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...