|
Call this function to add a joint between two dynamic objects.
- Parameters:
-
| pOtherObject |
| | The other dynamic object that this dynamic object will be linked too. To make this a joint to the world rather then another DynamicObject, set pOtherObject to zero. |
- Returns:
- A reference to a joint. The returned joint must be initialised before becoming active. See TA::PhysicsJoint.
- Note:
- It is recommended that directly linked objects are not allowed to collided with each other. Avoiding collisions reduces the number of constraints on a system, hence speeding up the simulation. Collisions can also sometimes prevent the joint from acting as designed. Disallowing collisions between joint objects can be done with TA::PhysicsJoint::SetCollisionDisabledBetweenObjects.
- Warning:
- This function calls
AddRef() on both dynamic objects being joined. If the joint is not removed before the user calls Release() , the dynamic objects will not be destroyed since the joint still holds a reference.
- Examples:
-
HingeJointExample.cpp, and SliderJointExample.cpp.
|