Game Development Reference
In-Depth Information
Adding vector fields to Fame
We just saw how to add obstacles to our Fame crowd scene. Right now, all of our
ships split when avoiding the cylinder, about half to the left and the other half to the
right. However, we want all of them to move to the left. To do this, we can vector
fields to the scene. Vector fields are a popular way of adding directional hints to a
scene, and they are defined areas that have directional vectors that are associated
with them. When a character is inside the field, the vector helps move the charac-
ter in the desired direction. Vector fields can be a powerful tool for level design and
are easy to add to your scene. To see how easy it is to add them to the scene,
add a new empty GameObject to the scene and name it Field . Then, attach the
FameField.cs script from Assets/Fame Assets/FameScripts to it. The field
Search WWH ::




Custom Search