Function IOffMeshLinkHandler.GetOffMeshLinkStateMachine
Called when an agent starts traversing an off-mesh link.
IOffMeshLinkStateMachine GetOffMeshLinkStateMachine (
context | Context for the traversal. Provides information about the link and the agent, as well as some helper methods for movement. This context is only valid for this method call. Do not store it and use it later. |
Called when an agent starts traversing an off-mesh link.
This can be used to perform any setup that is necessary for the traversal.
An object which will be used to control the agent for the full duration of the link traversal.
For simple cases, you can often implement IOffMeshLinkHandler and IOffMeshLinkStateMachine in the same class, and then just make this method return this. For more complex cases, you may want to keep track of the agent's identity, and thus want to return a new object for each agent that traverses the link.