NewtonJoint* NewtonConstraintCreateBall( const NewtonWorld* newtonWorld, const dFloat* pivotPoint, const NewtonBody* childBody, const NewtonBody* parentBody)
Create a ball an socket joint.
- const NewtonWorld *newtonWorld - is the pointer to the Newton world.
- const dFloat *pivotPoint - is origin of ball and socket in global space.
- const NewtonBody *childBody - is the pointer to the attached child rigid body, this body cannot be NULL and can not have an infinite mass (mass = 0).
- const NewtonBody *parentBody - is the pointer to the attached parent rigid body, this body can be NULL or any kind of rigid body.
- Pointer to the ball and socket joint.
- This function creates a ball and socket and add it to the world. By default joint disables collision with the linked bodies.