8

Wall Repel Behavior 1079
When you have more than one target, delegates
initially move toward the closest target in the
group, and t hen move over its surface until they
encounter another target, at which point they
switch to its surface, and so on.
Projection Vector group
These controls let you override the default
direction calculated by the Surface Follow
behav ior by descr ibing a vir tual plane a long which
the delegate is to move. You do this by spec ifying a
vector, in world coordinates, that’s perpendicular
to the desired virtual plane.
For example, if you want the delegate, when it
encounters a hill, to keep moving forward, straight
up and over the hill, instead of skirting it, you
would use the default Projection Ve ctor settings:
X=Y=0, Z=1. This vector is alig ned w ith the world
Z (vertical) axis, so it specifies a plane parallel to
the world XY plane. Thus, the delegate always
moves straight ahead while following the surface.
Use Pr ojection—When on, Surface Follow
calculates delegate direction from the specified
vector, rather than using the default.
X/Y /Z—Specifies a vector using world coordinates.
Default=X=Y=0, Z=1. Range=-1.0 to 1.0.
If only one of these settings is not 0, then the
projection vector is aligned with the non-zero axis.
Combinenon-zerosettingstocreateangledplanes
for Surface Follow. For example, to create a virtual
plane that’s rotated 45 degrees clockw ise about
worldYaxis,setX=Z=1andY=0.Also,whileyou
can set a l l three axes to 0, that specifies no vector,
and so effectively turns off Use Projection.
Position on Sur face group
Offset—Specifies the delegate’s distance above the
surface, using the surface normal. Recalculated
at each frame.
Display Offset—When on, shows the Offset
distance as lines emanating from each vertex in the
surface object, perpendicular to the surface.
Co lor Swat chShows the color used to draw the
Surface Follow target (see D isplay Target, next)
during the solution. Cl ick the box to choose a
different color.
Display Ta rget—When on, the interim goal for
each delegate influenced by the Surface Follow
behaviorisdrawnintheviewportsasawireframe
sphere during the simulation solution.
Ifthedelegatestartsoutawayfromthesurface
to be followed, the target is most visible b efore
the delegate reaches the surface; the target is then
positioned along the surface edge. While the
delegate is actual ly following the surface, the target
is usually coincident with the delegate, because
Surfacefollowsetsanewdestinationonlyaframe
or two ahead.
Tar g et Sca le—Sets the t arget size.
Wal l Re pe l Be havio r
Create panel > Helpers > Object Type rollout > Crowd >
Setup rollout > New button > Wall Repel Behavior
Select a Crowd object. > Modify panel > Setu p rollout >
New button > Wall Repel Behavior
The Wa ll Repel behavior uses one or more grid
objects to repel delegates. When influenced by
the Wall Repel force, delegates turn until they’re
heading away from the g rid. It’s useful for keeping
objects ins ide a straight-sided enclosure, such as a
room in a building.
You can set the grids to repel from either side or
both sides, and optionally specif y a maximum
distance for repelling. You can also set the behavior
to act as though each gr id extends infinitely along
its plane.