Rigidbody Actor¶
Rigidbodies are used to simulate rigid objects. In order to create a rigidbody from a tetrahedral mesh you need:
Create a Simulation Mesh from the tetrahedral mesh.
While creating the simulation mesh from the source tetrahedral mesh with the tool described here, you must set the Shape Matching Constraints Generate property to OnePerParticle, and the other Constraints Generate options to DontGenerate. This will create a simulation mesh with only Shape Matching constraints, which is suitable for simulating a rigid object.
Create a RigidbodyActor and assign the Simulation Mesh.
Create an empty GameObject and add a RigidbodyActor component to it by clicking Add Component > MAGES > Mesh Deformations > Actors > Rigidbody Actor in the inspector
Assign the Simulation Mesh and a Physics World to the RigidbodyActor component
Note
You can edit the kinematic particles using the editing tool, by pressing the ‘Edit Particles’ button in the inspector.
In the particles that appear on the scene, left click to make them kinematic (red color) and shift + left click to make them dynamic (green color). If all particles are kinematic, the isKinematic property must be set to true in the inspector.
Render the rigidbody.
To render the rigidbody, you can add a MeshFilter and a MeshRenderer component to the GameObject and assign a mesh to the MeshFilter and a Material to the MeshRenderer.
Note
The mesh assigned to the MeshFilter should match the outer surface of the tetrahedral mesh used for generating the simulation mesh of this object in order for the collisions to be accurate.