HingeJoint()
Syntax
Result = HingeJoint(#Joint, EntityID, PivotX, PivotY, PivotZ, AxisX, AxisY, AxisZ, EntityID2, PivotX2, PivotY2, PivotZ2, AxisX2, AxisY2, AxisZ2)Description
Creates a new hinge joint between the two given entities. Hinge can be used to simulate door, moving bridge etc.
Parameters
#Joint The number to identify the new joint. #PB_Any can be used to auto-generate this number. EntityID The first entity id associated to the joint. To get a valid entity id, use EntityID(). PivotX The X coordinate of the pivot point for the joint. Relative to the center of the entity. PivotY The Y coordinate of the pivot point for the joint. Relative to the center of the entity. PivotZ The Z coordinate of the pivot point for the joint. Relative to the center of the entity. AxisX The X orientation of the axis for the joint. AxisY The Y orientation of the axis for the joint. AxisZ The Z orientation of the axis for the joint. EntityID2 The second entity id associated to the joint. To get a valid entity id, use EntityID(). PivotX2 The X coordinate of the second pivot point for the joint. Relative to the center of the second entity. PivotY2 The Y coordinate of the second pivot point for the joint. Relative to the center of the second entity. PivotZ2 The Z coordinate of the second pivot point for the joint. Relative to the center of the second entity. AxisX2 The X orientation of the axis for the joint. AxisY2 The Y orientation of the axis for the joint. AxisZ2 The Z orientation of the axis for the joint.
Return value
Returns zero if the joint can't be created. If #PB_Any is used as '#Joint' parameter, the new joint number will be returned as 'Result'.
Remarks
GetJointAttribute() and SetJointAttribute() can be used with the following attribute to change the joint behavior:#PB_HingeJoint_LowerLimit : Lower limit of the joint #PB_HingeJoint_UpperLimit : Upper limit of the joint
See Also
FreeJoint(), GetJointAttribute(), SetJointAttribute(), EnableHingeJointAngularMotor()
Supported OS
All