Waypoint File Format

From Digital Spaces

Jump to: navigation, search

The AgentManager_Waypoint uses an XML file defining the waypoints per path, the agents following each path, and the behaviour of the agents.

Each waypoint is a scenegraph Node, see Scene File Format#node.

<waypoints>
	<path name="NAME">
		<agent name="AGENT_NAME" curwaypoint="NODE_NAME" template="AGENT_TEMPLATE" startspawn="false" inscene="true">
			<startpos x="0.0" y="0.0" z="0.0" />
			<tolerance x="1.0" y="0.0" z="1.0" />
			<agentstate active="true" />
		</agent>
		<node name="NODE_NAME">
			<position x="0.0" y="0.0" z="0.0" />
			<waypoint speed="0.0" >
				<wait duration="0.0" />
				<waitstate agent="OTHER_AGENT_NAME" state="AGENT_STATE" level="STATE_LEVEL" />
			</waypoint>
		</node>
	</path>
</waypoints>
 

Contents

waypoints

Root element.

path

Multiple path elements are supported.

  • name - string - identifier of path for human reference.

agent

Specifies an agent that will be following the containing path. Multiple agent elements are supported.

  • name - string - Identifier of the Agent.
  • curwaypoint - string - Identifier of the current target node (waypoint).
  • template - string - optional - Agent Template identifier used to create the Agent, if startspawn is set to true.
  • startspawn - boolean - Specifies if the component needs to instruct the Agent Manager to create (spawn) the Agent. Use false if the Agent is specified in the .space file.
  • inscene - boolean - Opposite of startspawn?
startpos

vector - starting position of agent?

tolerance

vector - distance (in meters) within which the Agent is considered to have reached a waypoint.

agentstate
  • active - boolean - Specifies if the Agent is being currently controlled by the component.

node

Each node is used as a waypoint. It supports all parts of the .scene format <node> element (see Scene File Format#node), and will be loaded into the scene graph by the waypoint component. For example, this allows you to load waypoint markers.

waypoint
  • speed - float - The speed the Agent should be moving at when reaching the waypoint. In the current implementation, speeds are blended between waypoints. Specifically, at 50% distance between two waypoints, the target speed will be the speed of the previous waypoint, plus 50% of the difference between waypoint speeds.
wait
  • duration - float - Causes the agent to wait for the specified number of seconds before moving towards the next waypoint.
waitstate

Used to make any agents following this path wait for another agent to reach a certain state before continuing. Multiple waitstate elements are supported. All conditions must be true before the Agent will continue.

  • agent - string - identifier of another agent
  • state - string - identifier of the agent state
  • level - float - required level of the agent state. Note, this is an exact value, not a threshold value.
Personal tools