Class PhysicsJoint
Hierarchy (View Summary)
- PhysicsJoint
Constructors
constructor
-
Initializes the physics joint
Parameters
- type: number
The type of the physics joint
- jointData: PhysicsJointData
The data for the physics joint
Returns PhysicsJoint
- type: number
Properties
joint Data
The data for the physics joint
type
type: number
The type of the physics joint
StaticBall And Socket Joint
BallAndSocketJoint: number = 2
Ball-and-Socket joint type
StaticDistance Joint
DistanceJoint: number = 0
Distance-Joint type
StaticHinge2 Joint
Hinge2Joint: number = PhysicsJoint.WheelJoint
Hinge-Joint 2 type
StaticHinge Joint
HingeJoint: number = 1
Hinge-Joint type
StaticLock Joint
LockJoint: number = 10
Lock-Joint type
StaticPoint To Point Joint
PointToPointJoint: number = 8
Point to Point Joint type. Similar to a Ball-Joint. Different in parameters
StaticPrismatic Joint
PrismaticJoint: number = 5
Prismatic-Joint type
StaticSlider Joint
SliderJoint: number = 4
Slider-Joint type
StaticSpring Joint
SpringJoint: number = 9
Spring-Joint type
StaticUniversal Joint
UniversalJoint: number = 6
Universal-Joint type ENERGY FTW! (compare with this -
StaticWheel Joint
WheelJoint: number = 3
Wheel-Joint type
Accessors
physics Joint
-
get physicsJoint(): any
Gets the physics joint
Returns any
-
set physicsJoint(newJoint: any): void
Sets the physics joint
Parameters
- newJoint: any
Returns void
physics Plugin
-
set physicsPlugin(physicsPlugin: IPhysicsEnginePlugin): void
Sets the physics plugin
Parameters
- physicsPlugin: IPhysicsEnginePlugin
Returns void
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
See
https://doc.babylonjs.com/features/featuresDeepDive/physics/usingPhysicsEngine