Class Hinge2Joint
Hierarchy (View Summary)
- MotorEnabledJoint
- Hinge2Joint
Constructors
constructor
-
Initializes the Hinge2-Joint
Parameters
- jointData: PhysicsJointData
The joint data for the Hinge2-Joint
Returns Hinge2Joint
- jointData: PhysicsJointData
Properties
joint Data
The data for the physics joint
type
The type of the physics joint
StaticBall And Socket Joint
Ball-and-Socket joint type
StaticDistance Joint
Distance-Joint type
StaticHinge2 Joint
Hinge-Joint 2 type
StaticHinge Joint
Hinge-Joint type
StaticLock Joint
Lock-Joint type
StaticPoint To Point Joint
Point to Point Joint type. Similar to a Ball-Joint. Different in parameters
StaticPrismatic Joint
Prismatic-Joint type
StaticSlider Joint
Slider-Joint type
StaticSpring Joint
Spring-Joint type
StaticUniversal Joint
Universal-Joint type ENERGY FTW! (compare with this -
StaticWheel Joint
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
Methods
execute Native Function
-
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
- func: (world: any, physicsJoint: any) => void
set Limit
-
Set the motor limits. Attention, this function is plugin specific. Engines won't react 100% the same.
Parameters
- upperLimit: number
the upper limit
OptionallowerLimit: numberlower limit
- motorIndex: number = 0
the motor's index, 0 or 1.
Returns void
- upperLimit: number
set Motor
-
Set the motor values. Attention, this function is plugin specific. Engines won't react 100% the same.
Parameters
OptionaltargetSpeed: numberthe speed the motor is to reach
OptionalmaxForce: numbermax force for this motor.
- motorIndex: number = 0
motor's index, 0 or 1.
Returns void
This class represents a dual hinge physics joint (same as wheel joint)
See
https://doc.babylonjs.com/features/featuresDeepDive/physics/usingPhysicsEngine