Game Development Reference
In-Depth Information
At some point, you can go no higher without resorting to jumping as you go up at an angle, and even
that may not be enough.
3.
In the Character Controller component, set the Slope Limit to 90 degrees.
4.
Attempt the steep slope again.
This time you should be able to get out of the pit or up to the top of the most unlikely mountain
peak (Figure 3-9 ).
Figure 3-9. A deep, steep-sided pit, no longer a trap for the First Person Controller
5.
Set the Slope Limit back to 45 degrees.
6.
Stop Play mode.
Step Offset determines how high an object is when the slope is steeper than the limit. This will allow
the First Person Controller to go up steps without being blocked by the Slope Limit.
1.
Focus in on the First Person Controller in the Scene view.
2.
From the GameObject menu, Create Other, create a Cube.
3.
In its Transform component, set its Scale parameters to 3 x 0.4 x 3 to create
a nice platform.
4.
Position it somewhere in front of the First Person Controller, slightly
intersecting the ground on the approach side.
Search WWH ::




Custom Search