Result = GenericJoint(#Joint, EntityID, TransformX, TransformY, TransformZ, EntityID2, TransformX2, TransformY2, TransformZ2)
Creates a new joint, based on one or two points.


#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().
TransformX, TransformY, TransformZ The transformation to apply for the first 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().
TransformX2, TransformY2, TransformZ2 (optional) The transformation to apply for 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'.


GetJointAttribute() and SetJointAttribute() can be used with the following attribute to change the joint behavior:
  #PB_Joint_EnableSpring: sets to #True to enable spring, #False to disable it (default)
  #PB_Joint_Stiffness   : sets the stiffness. Values should be between 1 and 10000
  #PB_Joint_Damping     : sets the damping. Values should be between 0 and 1 (0 means a very strong damping).
  #PB_Joint_Position    : sets the position on the axis
  #PB_Joint_NoLimit     : free axis position
  #PB_Joint_LowerLimit  : lower limit
  #PB_Joint_UpperLimit  : upper limit

See Also

FreeJoint(), GetJointAttribute(), SetJointAttribute()

Supported OS


<- FreeJoint() - Joint Index - GetJointAttribute() ->