RSX Code Reference
    Preparing search index...
    • rsx
    • PhysicsMaterial

    Class PhysicsMaterial

    Material that controls how two physical objects interact with each other. Materials of both objects are used during their interaction and their combined values are used.

    Hierarchy (View Summary)

    Index
    • Creates a new physics material.

      Parameters

      • OptionaldynamicFriction: number

        Sets dynamic friction of the material. Controls friction when two in-contact objects are moving lateral to each other (for example how quickly does an object slow down when sliding along another object).

      • Optionalrestitution: number

        Controls "bounciness" of an object during a collision. Value of 1 means the collision is elastic, and value of 0 means the value is inelastic. Must be in [0, 1] range.

      • OptionalisInternalConstructor: boolean

      Returns PhysicsMaterial

    • get dynamicFriction(): number

      Controls friction when two in-contact objects are moving lateral to each other (for example how quickly does an object slow down when sliding along another object).

      Returns number

    • set dynamicFriction(value: number): void

      Parameters

      • value: number

      Returns void

    • get isDestroyed(): boolean

      Determines if the resource is destroyed.

      Returns boolean

      This can happen when the Resource was forcefully unloaded or reverted. For this reason, it is safer to hold on to a instead of directly referencing a resource pointer, as the current Resource can always be retrieved via .value.

    • get name(): string

      Name of the resource. Use primarily for easier identification and not important to the engine itself.

      Returns string

    • get restitution(): number

      Controls "bounciness" of an object during a collision. Value of 1 means the collision is elastic, and value of 0 means the value is inelastic. Must be in [0, 1] range.

      Returns number

    • set restitution(value: number): void

      Parameters

      • value: number

      Returns void

    • get uuid(): UUID

      Returns a universally unique identifier of this resource.

      Returns UUID

    • Duplicates the resource and creates a unique UUID for the duplicated resource.

      Returns Resource

      The duplicated resource or null, if the duplication failed.

    • Virtual

      Method called by RSX to perform actions required after the creation of the resource.

      Returns void

    • Virtual

      Method called by RSX to perform any operations needed after deserialization.

      Returns void

      Use this API to restore your serializable data into live objects.

    • Virtual

      Method called by RSX to disable the resource.

      Returns void

      Use this API to deactivate the resource before it is serialized.

    • Virtual

      Method called by RSX to enable the resource.

      Returns void

      Use this API to activate the resource after it has been disabled by serialization.

    • Virtual

      Method called by RSX to perform initialization of the resource.

      Returns void

      Use this API to initialize data and default construct all fields.

    • Virtual

      Method called by RSX to perform any operations before serialization.

      Returns void

      Use this API to bake your live data into serializable data.

    • Reverts the resource to the on-disk representation.

      Returns boolean

      This is a potentially expensive call, as it needs to deserialize and replace all existing in-memory resource handles.