Traffic Goto
Traffic Goto Behavior (beTrafficGoto) adds a target destination, or a wander behavior, to entities already using the Traffic behavior
For more information on traffic in Golaem Crowd, see Traffic Locator & Traffic tutorial
To use a Traffic Goto Behavior, a Traffic Locator and a Traffic behavior are mandatory.
If no target is found, the target will wander as if there was no Traffic Goto.
CREATION
- Behavior Editor / Behavior Library:
- Golaem Menu: Crowd Behaviors / Behaviors / CrowdBe Traffic Goto Node
- MEL command: glmCrowdBeTrafficGotoCmd;
CONFIGURATION
A Traffic Goto Behavior defines the following specific attributes. For common attributes see Behavior Common Attributes.
Traffic Goto Attributes
The target position is defined by a bound locator. The target will NOT be updated in real time during simulation (no animated target). Following a specific path can be achieved by chaining several Traffic GoTo.
Target Mode |
The Traffic Goto will either wander forever, or try to reach a target and stop, according to the mode : Random Target In EnvironmentIin this mode, the car wanders, choses a new lane each time it reaches a crossing. Thus it keeps wandering forever (if the traffic network has no dead ends) Use Target PoptoolIf this mode is selected, all entities will try to reach slots on the Crowd Target Locator selected in the "In Target Poptool" field. Target Particle SystemIn this mode, each Entity will be assigned to its corresponding particle in the target particle (or nParticle) system selected in the "In Particle System" field (i.e. entity of particleId 1 will be assigned to the target of particleId 1…). If the target particle system contains fewer particles than the navigating Entity, the entity particleId will be moduled by the size of the target particle system (i.e. entity of particle 6 will be assigned to the target of particleId 1 if the target particle system has 5 particles...).
Note that Golaem Crowd Population Tool can be used to emit the target particle system.
Example of a target particle system It is also possible to specify the assignment of each Entity in the targeted particle system thanks to the field "Target Id PPName". If this field is set, each Entity will be assigned to the target whose id is stored in the float per-particle attribute stored in the "Target Id PPName" attribute of its relative particle. If this field is not set, or its value for one Entity is negative, the particleId will be used. See ppAttributes Handling.
Per Particle Target AttributeIn this mode, each Entity will be assigned to the position stored in the vector Golaem Attribute (or per-particle attribute) stored in the "Target PPName" attribute. The Y value of this per-particle attribute will be projected on the terrain. See Golaem Attributes Handling (or ppAttributes Handling). Target ExpressionIf this mode is selected, the target comes from an expression evaluation. A helper provides the special names to use entity data. |
Target Reach Treshold |
For all modes having a specific target, this is the limit distance where the goto consider to be arrived, and exit |
In Target Poptool | See "Use Target Poptool" mode above. |
Slot Assign Mode |
Available in "Use Target Poptool" mode. This determines the way the population tool slots are assigned as goto targets
global proc int defaultSlotAssign(int $index) { return $index; } |
Slot Assign MEL | See "Slot Assign Mode" above |
In Particle System | See "Target Particle System" mode above. |
Target Id PPName | See "Target Particle System" mode above. |
Target PPName | See "Per Particle Target Attribute" mode above. |
In Target Expression |
An Expression with a vector output. |
Traffic Goto Advanced Attributes
U Turn Mode |
|
Stop On Target Reached |
By default, Go To behaviors stop when reaching their target. This has no effect in wander mode |