Game Development Reference
In-Depth Information
Programmatically altering a motor joint is very limited at the time of this writing. There is
currently no public property to alter a motor joint's rate property in code. You also can't
invalidate and create a new motor joint in order to change the rate property because this
would reset the joint's existing momentum. You'd have to use the private Chipmunk
classes and C functions to programmatically alter a motor joint.
Summary
In this chapter, you learned a lot about joints and how to make complex physics objects
like chains and ropes. You also learned how to create mechanical, trigger-activated objects
like the spring. You'll find the resulting project in the 10 - Chains Ropes and Springs
folder.
I hope you also take away the many potential problems associated with joints. They can
cause very odd behavior if used incorrectly or allowed to accumulate too much force. It
takes time to get a good feel for both values and how to model complex physics bodies
with joints.
In the next chapter, you'll raise the complexity level as you implement a soft-body phys-
ics player with custom rendering to deform the player's texture.
Search WWH ::




Custom Search