ProtoTwin API
    Preparing search index...

    Class Joint

    Physics joint.

    Used to constrain one rigid body relative to another. Can be used in combination with MotorComponent to drive parts along/about linear/rotational axes or paths.

    Hierarchy (View Summary)

    Implements

    Index

    Accessors

    • get anchor(): Vec3

      The local anchor.

      Returns Vec3

      Used for revolute, spherical and path joints.

    • set anchor(value: Vec3): void

      Parameters

      Returns void

    • get axis(): Vec3

      The local axis.

      Returns Vec3

      Used for prismatic and revolute joints.

    • set axis(value: Vec3): void

      Parameters

      Returns void

    • get base(): null | Entity

      The base entity to which the joint is connected.

      Returns null | Entity

      If null, the joint is connected to the world.

    • set base(value: null | Entity): void

      Parameters

      Returns void

    • get entity(): Entity

      The entity to which the physics component is attached.

      Returns Entity

    • get position(): number

      The current position of the joint.

      Returns number

      Only valid for prismatic, revolute and path joints.