Soft body component class
Game object component. Controls the object position through the Truss Physics simulation. Works with MeshFilter component to deform its mesh. The component uses a TxTruss asset to define the object physic model and collision shape.
truss | TxTruss asset of the soft body |
linearVelocity | Linear velocity of the centre of mass of the soft body |
angularVelocity | Angular velocity of the soft body rotation around the centre of mass |
isActive | Activation state of the soft body |
nodeCount | Number of nodes of the soft body |
nodePosition | Array of current positions of the soft body nodes |
nodeLocalPosition | Array of current local positions of the soft body nodes |
nodeVelocity | Array of current velocities of the soft body nodes |
linkCount | Number of links of the soft body nodes |
linkLength | Array of current link lengths of the soft body |
linkPlastic | Array of current link plastic deformations of the soft body |
matters | Array of matters of the soft body |
Activate | Activates the soft body |
ApplyImpulse | Applies an impulse to the centre of mass, a node, or a point on a face of the soft body |
ResetGroup | Removes the soft body from its group |
onBeforeStep | Raised before the simulation step |
onAfterStep | Raised after the simulation step |
onAfterUpdate | Raised on each frame after the body transformation update |
onCollision | Raised after the simulation step for each body this body collides with |