9
Wall Repel Behavior 1227
When you have more than one target, delegates
initially move toward the closest target in the
group, and then m ove over its sur face unti l 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 describing a virtual plane along which
the delegate is to move. You do this by specifying 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 t he hill, instead of skirting it, you
would use the default Projection Vector settings:
X=Y=0, Z=1. This vector is aligned with 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, t hen the
projection vector is aligned with the non-zero axis.
Combinenon-zerosettingstocreateangledplanes
for Surface Follow. For example, to create a v irtual
plane t hat’s rotated 45 degrees clockwise about
worldYaxis,setX=Z=1andY=0.Also,whileyou
can set a ll three axes to 0, that specifies no vector,
and so effectively turns off Use Projection.
Position on Surface group
Offset—Specifies the delegate’s dis tance above the
surface, using the surface normal. Recalculated
at each frame.
Display Of fset—When on, shows the Offset
distance as lines emanating from each vertex in the
surface object, perpendicular to the surface.
Co lor Swatch——Shows the color used to draw the
Surface Follow target (see Display Target, next)
during the solution. Click the box to choose a
different color.
Display Target——When on, the interim goal for
each delegate influenced by the Sur face Follow
behaviorisdrawnintheviewportsasawireframe
sphere during the simulation solution.
Ifthedelegatestartsoutawayfromthesurface
to be followed, the target is most visible before
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.
Ta r get S ca l e——Sets the target size.
Wall Repe l Behavio r
Create panel > Helpers > Object Type rollout > Crowd >
Setup rollout > New button > Wall Repel B ehavior
Select a Crowd object. > Modify pa nel > Setup rollo ut >
New button > Wall Repel Behavior
The Wall 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 grid. It’s useful for keeping
objects inside 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 specify a maximum
distance for repelling. You can also set the b ehavior
to act as though each grid extends infinitely along
its plane.