Game Development Reference
In-Depth Information
Figure 9-5 . Joint properties common to (almost) all joints
The Body A and Body B fields show the Timeline names of the connected nodes. The
right-facing arrow allows you to conveniently select that particular node. The X icon lets
you remove the current connection, while the circle icon to the left of it allows you to drag
a line and reconnect the joint with a body. The circle buttons are equivalent to the same
icons displayed underneath the joint shape on the stage if the joint is connected to just one
body or no body.
The Collide bodies check box is not selected by default, because in most cases you don't
want bodies connected via a joint to be colliding with one another. In this case, the chain
elements are overlapping, so if they did collide with each other it would be a problem.
You'll find a good use for selecting Collide bodies when designing the Spring object.
Anchor A (and, for other joints, Anchor B as well) determines where the connection
between the two bodies is made. The coordinates are in points and always relative to the
Body A node, which in this case is the hook node. Since you want the first chain to be
pinned to the hook, set Anchor A to 0x0 .
Breaking force and Max force are set to infinity by default, meaning the joint will never
sever its connections and it is allowed to use maximum force to resolve its constraints.
Max force can be used specifically to get restless joint connections under control. To
avoid applying and accumulating too much force, you can limit the maximum force the
joint applies to resolve its constraints. Doing this prevents a large amount of force from
corrupting the complex object or from propelling objects touching it away at high speeds.
With Breaking force , you can determine the maximum amount of force the joint will be
able to withstand. If that amount of force is exceeded, the joint will be removed, separat-
ing the connection between the two bodies. You will have to find an appropriate breaking
Search WWH ::




Custom Search