ProtoTwin API
    Preparing search index...

    Class PhysicsMaterial

    Physics material. Defines physical properties that affect how physics colliders interact in the simulation.

    Hierarchy (View Summary)

    Implements

    Index

    Accessors

    • get damping(): number

      The damping coefficient for the physics material.

      Returns number

      Used only for compliant/soft contacts (i.e. when restitution is negative).

    • set damping(coefficient: number): void

      Parameters

      • coefficient: number

      Returns void

    • get dynamicFriction(): number

      The dynamic friction coefficient for the physics material.

      Returns number

    • set dynamicFriction(coefficient: number): void

      Parameters

      • coefficient: number

      Returns void

    • get name(): string

      The name that uniquely identifies the physics material.

      Returns string

    • set name(value: string): void

      Parameters

      • value: string

      Returns void

    • get restitution(): number

      The restitution coefficient for the physics material.

      Returns number

      A value of 0 means no bounce (perfectly inelastic collision), while a value of 1 means a perfectly elastic collision. The Settings.bounceThresholdVelocity property will cause the restitution to be ignored when the relative velocity is smaller than the bounce threshold velocity. When the restitution coefficient is negative, the value is interpreted as a spring constant enabling compliant/soft contacts.

    • set restitution(coefficient: number): void

      Parameters

      • coefficient: number

      Returns void

    • get staticFriction(): number

      The static friction coefficient for the physics material.

      Returns number

    • set staticFriction(coefficient: number): void

      Parameters

      • coefficient: number

      Returns void