Updated Linear Spring.md (markdown)
commited
commit
9250d3e70abc5fab308da12ae1e2a598c73f643a
... | ... | @@ -1,11 +1,17 @@ |
1 | 1 | Makes the constraint springy, like a car's suspension. |
2 | 2 | |
3 | The [[linear limits]] constraint is necessary because it stores the upper and lower limits between which the objects can move. Adding a linear spring script makes the objects "spring" between these upper and lower limits. To find the perfect "stiffness" and "damping" values for your game, trying [[copying the ones below|#examples]] and then adjust them until you get the results you were looking for. |
|
4 | ||
5 | 3 | [[/uploads/Linearspring.png]] |
6 | 4 | |
7 | # Examples |
|
5 | Inputs: |
|
6 | ||
7 | * Constraint: This script must use the output of an [[add constraint]] script. |
|
8 | * Stiffness: A vector value. Determines the amount of force that that will be used to "spring" the objects towards their original positions. |
|
9 | * Damping: A vector value. Acts as a kind of "drag" so that objects will not spring continually. |
|
10 | ||
11 | ## Notes |
|
12 | Before this script will function as expected, a "[[linear limits]]" constraint must be applied to the same two objects. The linear limits constraint is necessary because it stores the upper and lower limits between which the objects can move. Adding a linear spring script makes the objects "spring" between these upper and lower limits. |
|
8 | 13 | |
9 | Before this script will function as expected, a "linear limits" constraint must be applied to the same two objects. An image is shown below. |
|
14 | ## Examples |
|
15 | To find the perfect "stiffness" and "damping" values for your game, try copying the ones below and then adjust them until you get the results you were looking for. |
|
10 | 16 | |
11 | [[/uploads/Linearspringexample.jpg]] |
|
17 | [[/uploads/Linearspringexample.jpg]] |
|
... | ... | \ No newline at end of file |