From Newton Wiki
Jump to: navigation, search


void NewtonBodySetJointRecursiveCollision( const NewtonBody* bodyPtr, unsigned state)


Set the collision state flag of this body when the body is connected to another body by a hierarchy of joints.


  • const NewtonBody *bodyPtr - pointer to the body.
  • int state - collision state. 1 indicates this body will collide with any linked body. 0 disable collision with body connected to this one by joints.


  • Nothing.


  • sometimes when making complicated arrangements of linked bodies it is possible the collision geometry of these bodies is in the way of the joints work space. This could be a problem for the normal operation of the joints. When this situation happens the application can determine which bodies are the problem and disable collision for those bodies while they are linked by joints. For the collision to be disable for a pair of body, both bodies must have the collision disabled. If the joints connecting the bodies are destroyed these bodies become collidable automatically. This feature can also be achieved by making special material for the whole configuration of jointed bodies, however it is a lot easier just to set collision disable for jointed bodies.

See also