class MAGES::MeshDeformations::RopeActor¶
Overview¶
A rope actor. More…
class RopeActor: public MAGES::MeshDeformations::BasePhysicsActor { public: // structs struct UpdateKinematicParticlesJob; // properties float Length; float Mass; float Damping; float BendingCompliance; bool Breakable; float BreakForce; bool SelfCollision; uint Layer; bool UpdateKinematicParticles; UnityEvent OnBreak; // methods virtual override void AddToPhysicsWorld(); virtual override void RemoveFromPhysicsWorld(); void Cut(Disc cuttingDisc); };
Inherited Members¶
public:
// properties
PhysicsWorld PhysicsWorld;
SimulationMesh SharedSimulationMesh;
SimulationMesh SimulationMesh;
bool IsPartOfPhysicsWorld;
UnityEvent<PhysicsWorld> AddedToPhysicsWorld;
UnityEvent<PhysicsWorld> RemovedFromPhysicsWorld;
// methods
virtual void AddToPhysicsWorld();
virtual void RemoveFromPhysicsWorld();
Detailed Documentation¶
A rope actor.
Properties¶
float Length
Gets or sets the length of the rope.
float Mass
Gets or sets the total rope mass.
float Damping
Gets or sets the damping applied to each particle. A value in the range [0, 1].
float BendingCompliance
Gets or setsh the bending compliance of the rope. A value in the range [0, Infinity].
bool Breakable
Gets or sets a value indicating whether the rope is breakable.
float BreakForce
Gets or sets the break force of the rope. Only valid if Breakable is true.
bool SelfCollision
Gets or sets a value indicating whether self collision is enabled.
uint Layer
Gets or sets the layer used for collision filtering.
bool UpdateKinematicParticles
Gets or sets a value indicating whether to update the kinematic particles position when this actor’s transform is updated.
UnityEvent OnBreak
Gets or sets the event called when the rope breaks due to exceeding the break force.
Methods¶
virtual override void AddToPhysicsWorld()
Override this function to add the simulation mesh to the physics world.
virtual override void RemoveFromPhysicsWorld()
Override this function to remove the simulation mesh from the physics world.
void Cut(Disc cuttingDisc)
Cuts the rope at the specified position.
Parameters:
cuttingDisc |
The disc, based on which to perform the cut. |