Game Development Reference
In-Depth Information
If the Bake function isn't covering all the areas, you'll need to check its grid dimen-
sions. X remains the same in the world space, but Y is actually the Z axis. You might
need to increase or decrease these numbers to cover everything in the scene:
Quick Path converts the values of the Y or Z axis values internally. By default, it is set
to Y as the Up/Down axis, but you can change this with the Up Direction parameter.
Now that we have a larger surface area to work with, we'll get the NPC object set up
to patrol. If the object still has the following script, you will need to remove it, but then
add the Quick Path patrol script. Then, the first thing to do in the Inspector panel for
the patrol script is change the speed to 2 , as its default of 10 was rather fast.
Next, set Spill Distance to 0.1 . Spill Distance is how close you have to be to a
waypoint before it picks the next waypoint as your target. If Ping Pong is checked,
the NPC will stop at the end of its path and backtrack. If it is unchecked, at the end
of its path, it will target the first position and start over.
Search WWH ::




Custom Search