Game Development Reference
In-Depth Information
Congratulations! You have now written your first player controls class that can read
user input from multiple axes and use that to drive a rotating and translating charac-
ter capsule. To test this class, let's set the following default values in the Inspector
pane as seen in the previous screenshot:
Track Obj : Set this to the Player1 object by dragging-and-dropping the ob-
ject reference from the Hierarchy tab to the trackObj reference in the ob-
ject inspector.
Height : Set this to 0.25 . In general, the lower the camera, the more dramatic
the effect, but the less playable the game will be (because the user can see
less of the world on screen).
Desired Distance : Set this to 4 . At this setting, we can see the character
framed nicely on screen when it is both moving and standing still.
Rot Damp : Set this to 0.01 . The smaller this value, the looser and more in-
teresting the rotation effect. The larger this value, the more tense the spring
in the interpolation.
Height Damp : Set this to 0.5 . The smaller this value, the looser and more
interesting the height blending effect.
Try experimenting with the following values and see what happens:
Search WWH ::




Custom Search