HTML and CSS Reference
In-Depth Information
Figure 13-6. Adding the sliders to control the walk
Table 13-1 shows the slider names (from left to right), what they do, and the settings to use for them.
These are just ranges and values that seem to work well, but feel free to experiment with other values.
Table 13-1. The Sliders for Controlling the Walk Cycle
Instance
Description
Settings
speedSlider
Controls the speed at which the system moves.
minimum: 0
maximum: 0.2
value: 0.08
thighRangeSlider
Controls how far back and forth the top-level segments (thighs)
can move.
minimum: 0
maximum: 90
value: 45
thighBaseSlider
Controls the base angle of the top-level segments. So far, this has
been 90, meaning that the legs point straight down and move back
and forth from there. But you can get some interesting effects by
changing this value.
minimum: 0
maximum: 180
value: 90
calfRangeSlider
Controls how much range of motion the lower segments (calves)
have.
minimum: 0
maximum: 90
value: 45
calfOffsetSlider
Controls the offset value (you've been using -Math.PI/2).
minimum: -3.14
maximum: 3.14
value: -1.57
Now, change the code so that it uses the values provided by the sliders, rather than hard-coded values.
 
Search WWH ::




Custom Search