PointJoint()
Syntax
Result = PointJoint(#Joint, EntityID, PivotX, PivotY, PivotZ [, EntityID2, PivotX2, PivotY2, PivotZ2])Description
Creates a new joint, based on one or two points.
Parameters
#Joint The number to identify the new joint. #PB_Any can be used to auto-generate this number. EntityID The 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. EntityID2 (optional) The second entity associated to the joint. If this parameter isn't specified, a single joint is created between the pivot point and the entity. If this parameter is specified, the first entity is anchored to the second entity. 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.
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_PointJoint_Tau : Tau value of the joint #PB_PointJoint_Damping: Damping value of the joint
See Also
FreeJoint(), GetJointAttribute(), SetJointAttribute()
Supported OS
All