API

Class PhysicsJoint

This is a holder class for the physics joint created by the physics plugin It holds a set of functions to control the underlying 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

  • Execute a function that is physics-plugin specific.

    Parameters

    • func: (world: any, physicsJoint: any) => void

      the function that will be executed. It accepts two parameters: the physics world and the physics joint

    Returns void