Class ColliderShape

Represents a single Collider shape.

Hierarchy

  • FrameworkObject
    • ColliderShape

Constructors

Accessors

  • get contactOffset(): number
  • Determines how far apart do two shapes need to be away from each other before the physics runtime starts generating repelling impulse for them. This distance will be the sum of contact offsets of the two interacting objects. If objects are moving fast you can increase this value to start generating the impulse earlier and potentially prevent the objects from interpenetrating. This value is in meters. Must be positive and greater than rest offset.

    Also see setRestOffset().

    Returns number

  • set contactOffset(value): void
  • Parameters

    • value: number

    Returns void

  • get layer(): rsx.LayerMask
  • Determines the layer of the collider. Layer controls with which objects will the collider collide.

    Returns rsx.LayerMask

  • set layer(value): void
  • Parameters

    Returns void

  • get mass(): number
  • Determines the mass of the collider. Only relevant if the collider is part of a rigidbody. Ultimately this will determine the total mass, center of mass and inertia tensors of the parent rigidbody (if they're being calculated automatically).

    Returns number

  • set mass(value): void
  • Parameters

    • value: number

    Returns void

  • get material(): PhysicsMaterial
  • Determines the physical material of the collider. The material determines how objects hitting the collider behave.

    Returns PhysicsMaterial

  • set material(value): void
  • Determines the physical material of the collider. The material determines how objects hitting the collider behave.

    Parameters

    Returns void

  • get restOffset(): number
  • Determines at what distance should two objects resting on one another come to an equilibrium. The value used in the runtime will be the sum of rest offsets for both interacting objects. This value is in meters. Cannot be larger than contact offset.

    Also see setContactOffset().

    Returns number

  • set restOffset(value): void
  • Parameters

    • value: number

    Returns void

Methods

  • Infers the collider shape extents from the mesh that is on the same scene object of the parent collider.

    Returns void