Targets

In the side panel of the CrowdSim node tree you can define Target Properties. These target properties can be used in the Behavior tree to let an agent lock to another agent or object.

../../_images/nodeeditor-sidepanel-crowd-target-properties.png

By pressing Add Target Property you can add a new target property to the list. By pressing Remove Target Property you can remove the highlighted target property. Double clicking on the target property you can change its name.

Lock Target Random

Lock to a random target.

../../_images/node-lock-target-random.png
  • Target Property: Target property to store the locked target in. If a target property is already filled for the active agent, then this node will be ignored. You first need to use the Unlock Target node to unset the target property.

  • Targets: The selection of agents and other objects to choose from. When socket is not linked, all agents in the scene will be used as selection.

  • Maximum Target Locks: Maximum that the target can be selected for the chosen target property.

Lock Target Nearest

Lock the nearest target.

../../_images/node-lock-target-nearest.png
  • Target Property: Target property to store the locked target in.

  • Maximum Target Locks: Maximum that the target can be selected for the chosen target property.

  • Targets: The selection of agents and other objects to choose from. When socket is not linked, all agents in the scene will be used as selection.

Lock Target In Formation

Lock to a target. Chose an agent from the targets socket to keep as close to the current formation of the agents as possible.

../../_images/node-lock-target-in-formation.png
  • Target Property: Target property to store the locked target in.

  • Targets: The selection of agents and other objects to choose from. When socket is not linked, all agents in the scene will be used as selection.

  • Agents: The selection of agents that define the formation to keep.

Lock Agents to Nearest Targets

Lock a group of agents to their nearest target. Each target will only be locked a single by a single agent. Which target is selected is determined by minimizing the distances between all agents and their targets.

../../_images/node-lock-agents-to-nearest-targets.png
  • Target Property: Target property to store the locked target in.

  • Targets: The selection of agents and other objects to choose from. When socket is not linked, all agents in the scene will be used as selection.

  • Agents: The selection of agents that define the formation to keep.

  • Target Reversed: When a target is chosen, automatically make the target lock the agent as well.

Unlock Target

Unset the target property from the active agent.

../../_images/node-unlock-target.png
  • Target Property: Target property to unset.

Has Locked Target

Test if the active target has a target selected for the chosen target property.

../../_images/node-has-locked-target.png
  • Target property: Target property to check.

Is Agent Targeted

Test if an agent is locked by another target. It tests the reverse of ‘Has Locked Target’.

../../_images/node-is-agent-targeted.png
  • Target property: Target property to check.

Look At

../../_images/node-look-at.png

Look at a target. This nodes makes it possible to have agents look at a target object. Create a target property and set the target using the Lock target node. Set the target of this node to the same property.

  • Target Property: Target property to look at or to follow.

Distance to Target

../../_images/node-distance-to-target.png

Check if an agent is closer to its target than a random distance between the minimum and maximum distance. Each agent will select a random number between minimum and maximum. The check will use that random number inside the check.

  • Target Property: Target property for checking distance

  • Minimum Distance: Lower boundary that each agent will use to select a distance.

  • Maximum Distance: Upper boundary that each agent will use to select a distance.