API

Class HingeJoint

This class represents a single physics Hinge-Joint

Hierarchy (View Summary)

Index
jointData: PhysicsJointData

The data for the physics joint

type: number

The type of the physics joint

BallAndSocketJoint: number = 2

Ball-and-Socket joint type

DistanceJoint: number = 0

Distance-Joint type

Hinge2Joint: number = PhysicsJoint.WheelJoint

Hinge-Joint 2 type

HingeJoint: number = 1

Hinge-Joint type

LockJoint: number = 10

Lock-Joint type

PointToPointJoint: number = 8

Point to Point Joint type. Similar to a Ball-Joint. Different in parameters

PrismaticJoint: number = 5

Prismatic-Joint type

SliderJoint: number = 4

Slider-Joint type

SpringJoint: number = 9

Spring-Joint type

UniversalJoint: number = 6

Universal-Joint type ENERGY FTW! (compare with this -

WheelJoint: number = 3

Wheel-Joint type

  • set physicsPlugin(physicsPlugin: IPhysicsEnginePlugin): void

    Sets the physics plugin

    Parameters

    • physicsPlugin: IPhysicsEnginePlugin

    Returns void

  • Set the motor's limits. Attention, this function is plugin specific. Engines won't react 100% the same.

    Parameters

    • upperLimit: number

      The upper limit of the motor

    • OptionallowerLimit: number

      The lower limit of the motor

    Returns void