Class SuspensionJoint

Represents a suspension joint.

Hierarchy

  • Joint

    Hierarchy

    • SuspensionJoint

Constructors

Properties

fileJoint: FileJoint & { controller: SuspensionControllerData }
fileShape: FileShape

Accessors

  • get color(): string
  • The color of this shape.

    Returns string

  • set color(value: string): void
  • Parameters

    • value: string

    Returns void

  • get shapeId(): string
  • The shapeId of this shape. Determines the model and behavior in-game.

    Returns string

  • set shapeId(value: string): void
  • Parameters

    • value: string

    Returns void

  • get stiffnessLevel(): number
  • The stiffness of the suspension joint.

    Returns number

  • set stiffnessLevel(value: number): void
  • Parameters

    • value: number

    Returns void

Methods

  • Attempts to convert a Joint to SuspensionJoint. Only returns if the Joint's file object is a SuspensionJoint.

    Returns

    The converted SuspensionJoint, or undefined if the Joint was not a SuspensionJoint.

    Parameters

    • potential: Joint

      The Joint to convert.

    Returns undefined | SuspensionJoint

  • Creates a suspension joint.

    Returns

    Parameters

    • position: Vector3

      The position of the suspension joint.

    • rotation: Axis

      The rotation of the suspension joint.

    • childA: Child

      The first child of the suspension joint.

    • Optional childB: Child

      The second child of the suspension joint. Optional.

    • Optional color: string

      The color of the suspension joint. Fallbacks to the suspension's default color.

    • sportSuspension: boolean = false

      Whether the suspension is a sport suspension. Defaults to false.

    • stiffness: number = 6

      The stiffness of the suspension. Defaults to 6.

    Returns SuspensionJoint

Generated using TypeDoc