Object Xml
Example XML:
<dynamic_object>
<diesel materials="units/path/material_config" orientation_object="rp_rootpoint_object" />
<bodies>
<body name="body_static" enabled="true" template="static">
<object name="c_collision" collision_type="box" padding="-2.5" />
</body>
</bodies>
<decal_surfaces default_material="stone">
<decal_mesh name="dm_decalmesh" enabled="true" material="steel" />
</decal_surfaces>
<graphics>
<object name="g_graphics" enabled="true" shadow_caster="true" />
</graphics>
</dynamic_object>
<diesel/>is a required table that holds a path to the materials and root object.materials="path"leads to the material config the unit will use.orientation_object="rp_rootpoint"the object that acts as the origin of the unit, must be an Empty object.
<bodies/>is the table that holds collision information.<body/>is the table that holds the objects that will be used as collision.nameis the name of the body you are making.enabledis a toggle for if collision should be enabled.templateis the physics template of the body.staticis solid collision.editoris editor only collision.- a full list of templates can be found in
settings/physics_settings.physics_settings. - templates can be edited in object by adding properties seem in the physics_settings file.
<object/>is the table that holds the referenced object. (The same object can be used more than once)nameis the name of the object being used.collision_typeis the shape/type of collision.boxis a box.sphereis a sphere.capsuleis a pill shape.convexis a convex shape based on your used object mesh.mesh_moppis a paper thin collision that is 1:1 the shape of your objects mesh.
two_sidedis a toggle for if your collision should be double sided. (Very buggy!)paddingis the additional thickness in cm of your object.- Default 0 leaves models 2.5cm thicker, use -2.5 to correct it.
- Does not apply to mesh_mopp collision.
<decal_surfaces/>is the table that holds a list of meshes to act as decal surfaces. (Blankets that allow decals to spawn)default_materialis used if no decal material information is avaliable when hit.
<decal_mesh/>is a table that holds a specific object to act as a decal surface.nameis the name of the object being used as the decal mesh.enabledis a toggle for if decal_mesh should be enabled.materialto be used when shot/hit.
<graphics/>is the table that holds all of the graphics objects.<object/>is a table that is used to control the selected graphic.nameis the name of the object being used as the graphic.enabledis a toggle for if the graphics should be visible.shadow_casteris a toggle for if the graphics object should cast a shadow. (typically used by shadow_caster material objects.s_shadowcaster)