Class BehaviorTreeMoveToNode
Moves an actor to the specific target location. Uses pathfinding on navmesh.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public class BehaviorTreeMoveToNode : BehaviorTreeNode, ISerializable
Constructors
BehaviorTreeMoveToNode()
Initializes a new instance of the BehaviorTreeMoveToNode.
Declaration
public BehaviorTreeMoveToNode()
Properties
AcceptableRadius
Threshold value between Agent and Target goal location for destination reach test.
Declaration
[EditorOrder(100)]
[Limit(0F, 3.40282347E+38F, 1F)]
[Unmanaged]
public float AcceptableRadius { get; set; }
Property Value
System.Single
|
Agent
The agent actor to move. If not set, uses Behavior's parent actor.
Declaration
[EditorOrder(10)]
[Unmanaged]
public BehaviorKnowledgeSelector<Actor> Agent { get; set; }
Property Value
BehaviorKnowledgeSelector<Actor>
|
MovementSpeed
The agent movement speed. Default value is 100 units/second.
Declaration
[EditorOrder(15)]
[Unmanaged]
public BehaviorKnowledgeSelector<float> MovementSpeed { get; set; }
Property Value
BehaviorKnowledgeSelector<System.Single>
|
Target
The target movement object.
Declaration
[EditorOrder(30)]
[Unmanaged]
public BehaviorKnowledgeSelector<Actor> Target { get; set; }
Property Value
BehaviorKnowledgeSelector<Actor>
|
TargetGoalUpdateTolerance
Threshold value for the Target actor location offset that will trigger re-pathing to find a new path.
Declaration
[EditorOrder(110)]
[Limit(0F, 3.40282347E+38F, 1F)]
[Unmanaged]
public float TargetGoalUpdateTolerance { get; set; }
Property Value
System.Single
|
TargetLocation
The target movement location.
Declaration
[EditorOrder(35)]
[Unmanaged]
public BehaviorKnowledgeSelector<Vector3> TargetLocation { get; set; }
Property Value
BehaviorKnowledgeSelector<Vector3>
|
UsePartialPath
If checked, the movement will start even if there is no direct path to the target (only partial).
Declaration
[EditorOrder(130)]
[Unmanaged]
public bool UsePartialPath { get; set; }
Property Value
System.Boolean
|
UsePathfinding
If checked, the movement will use navigation system pathfinding, otherwise direct motion to the target location will happen.
Declaration
[EditorOrder(120)]
[Unmanaged]
public bool UsePathfinding { get; set; }
Property Value
System.Boolean
|
UseTargetGoalUpdate
If checked, the target goal location will be updated while Target actor moves.
Declaration
[EditorOrder(140)]
[Unmanaged]
public bool UseTargetGoalUpdate { get; set; }
Property Value
System.Boolean
|
Methods
GetAgentSize(Actor, out Single, out Single)
Returns the agent dimensions used for path following (eg. goal reachability test).
Declaration
[Unmanaged]
public virtual void GetAgentSize(Actor agent, out float outRadius, out float outHeight)
Parameters
Actor
agent
|
System.Single
outRadius
|
System.Single
outHeight
|
GetNavMesh(Actor)
Move(Actor, Vector3)
Applies the movement to the agent. Returns true if cannot move.
Declaration
[Unmanaged]
public virtual bool Move(Actor agent, Vector3 move)
Parameters
Actor
agent
|
Vector3
move
|
Returns
System.Boolean
|