Game Development Reference
In-Depth Information
Spring Joint
A Spring Joint attaches two rigidbodies, where their respective movement is as if they were
connected by a spring. A spring has an equilibrium position where it is at rest. If the two rigidbodies
are pulled apart, the spring opposes this movement by pulling back. You can see the Spring Joint
component properties in Figure 7-15 .
Figure 7-15. Spring Joint component in the Inspector
The Connected Body for the Spring Joint property again indicates the rigidbody the spring joint is
attached to; if this is None, then it is connected to world space. The Anchor is the center of the joint
relative to the game object's local space, while the X , Y , and Z properties are the joint's local center.
You can see how these values change as you add a Connected Body.
The Spring property sets how hard the spring pulls back against an opposing force. Damper
opposes Spring much like Drag opposes a force. The higher the Damper value, the fewer oscillations
or “bounces” before the spring comes to rest.
Min Distance and Max Distance set a range within which the spring action will not activate, such
that the spring joint will not pull back until the rigidbody moves outside of this range. Break Force
and Break Torque determine the forces necessary to break the spring joint.
 
Search WWH ::




Custom Search