NewtonConstraintCreateUpVector

From Newton Wiki
Jump to: navigation, search

NewtonConstraintCreateUpVector

NewtonJoint* NewtonConstraintCreateUpVector( const NewtonWorld* newtonWorld, const dFloat* pinDir, const NewtonBody* Body)

Usage

Create a UpVector joint.

Return

  • Pointer to the up vector joint.

Remarks

  • This function creates an up vector joint. An up vector joint is a constraint that allows a body to translate freely in 3d space, but it only allows the body to rotate around the pin direction vector. This could be used by the application to control a character with physics and collision.

Remark Since the UpVector joint is a unary constraint, there is not need to have user callback or user data assigned to it. The application can simply hold to the joint handle and update the pin on the force callback function of the rigid body owning the joint.