class MAGES::MeshDeformations::ClothActor

Overview

A cloth simulation. More…

class ClothActor: public MAGES::MeshDeformations::BasePhysicsActor
{
public:
    // structs

    struct UpdateKinematicParticlesJob;
    struct UpdateMeshJob;

    // properties

    Mesh SourceMesh;
    float Mass;
    float Damping;
    bool SelfCollision;
    uint Layer;
    bool UpdateKinematicParticles;

    // methods

    virtual override void AddToPhysicsWorld();
    virtual override void RemoveFromPhysicsWorld();
};

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 cloth simulation.

Properties

Mesh SourceMesh

Gets or sets the source mesh used for creating the simulation mesh.

float Mass

Gets or sets the total cloth mass.

float Damping

Gets or sets the damping applied to each particle. A value in the range [0, 1].

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.

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.