Class DriverSeatPart

Represents a driver seat.

Hierarchy

  • Child

    Hierarchy

    • DriverSeatPart

Constructors

Properties

fileChild: FileChild
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

Methods

  • Connects this child to another child. Both children must be interactable.

    Parameters

    • other: number | Child

      The Child object or the ID of the child to connect to.

    Returns void

  • Disconnects this child from another child.

    Parameters

    • other: number | Child

      The Child object or the ID of the child to disconnect from.

    Returns void

  • Gets a list of IDs of bearings connected to this driver seat.

    Returns

    The list of IDs.

    Returns number[]

  • Adds or updates a connection to a bearing for steering.

    Parameters

    • bearing: number | BearingJoint

      The bearing to connect to. Can be an ID.

    • reverse: boolean = false

      Determines what direction the bearing turns when pressing A or D. 0 = normal, 1 = reversed. Usually, front-wheel-steering cars will have the bearings set to reversed. Defaults to false.

    • Optional steeringSettings: Omit<Partial<SteeringSettings>, "id">

      The steering settings for the bearing. Not required.

    Returns void

  • Attempts to convert a Child to a DriverSeatPart. Only returns if the Child's file object is a DriverSeatPart.

    Returns

    The converted DriverSeatPart, or undefined if the Child is not a DriverSeatPart.

    Parameters

    • potential: Child

      The Child to convert.

    Returns undefined | DriverSeatPart

  • Creates a driver seat.

    Returns

    The created driver seat.

    Parameters

    • position: Vector3

      The position of the driver seat.

    • rotation: Axis

      The rotation of the driver seat.

    • Optional color: string

      The color of the driver seat. Fallbacks to the driver seat's default color.

    • saddle: boolean = false

      Whether the driver seat is a saddle. Defaults to false.

    Returns DriverSeatPart

Generated using TypeDoc