Behavior Offset: Difference between revisions
m add to category (Engine documents) |
No edit summary |
||
Line 12: | Line 12: | ||
To make the offset relative to the target heading set the offset_relative_heading to true. This flag is default to false. | To make the offset relative to the target heading set the offset_relative_heading to true. This flag is default to false. | ||
Ex: <... side_offset="2" offset_relative_heading="true" .../> | |||
Latest revision as of 14:46, 31 March 2014
This describes the offset parameter for NPC behavior scripts. The blue axis show the offset axis system. Offset will make the chaser stop at that distance to the target. Side offset will make the chaser stop that far to side as show for the blue axis right to the target. This offset will be calculated when the target is aquired and not changed during a chase. So runing in a circle will cause the end point to be on the other side.
Ex: <... offset="1.0" side_offset="2.0" .../>
To prevent NPCs stacking up if multiple chases one target. The offset_angle could be used. When a new target is selected a new position on the arc of the green area is selected. The following example show about how to get this.
Ex: <... offset="2.0" offset_angle="45" .../>
To make the offset relative to the target heading set the offset_relative_heading to true. This flag is default to false.
Ex: <... side_offset="2" offset_relative_heading="true" .../>
The offset parameters are used by the Chase Operation.