Vixen
c7401864
csharp
public sealed class MoveDirectlyTowardTask

Walks toward a key in a straight line, ignoring navigation entirely.

Read the guide page for this →

Remarks

doc 37 § Part 3's MoveDirectlyToward, and it is not a worse MoveTo. A flier, a swimmer, a possessed suit of armour walking through a wall on purpose, a boss in a room with no mesh baked in it, and every prototype before the level has a navmesh — all of those want a position updated toward a point and nothing else. ⚠ It writes LocalTransform directly, so an entity that also has a NavigationAgent will have this fought over by the crowd. Use one or the other.

Methods (4)

  • public MoveDirectlyTowardTask(BlackboardKey key, float speed = 3, float acceptance = 0.5)

    Walks toward a key in a straight line, ignoring navigation entirely.

  • public void Start(in AgentContext context, Span<byte> state)

    Begins. Called once before the first Tick, on a zeroed span.

  • public ActionStatus Tick(in AgentContext context, Span<byte> state, float delta)

    Advances it.

  • public void Abort(in AgentContext context, Span<byte> state)

    Stops it early. The span is zeroed afterwards; this is for what is outside it.

Used by (2)

  • MoveDirectlyTowardTestsVixen.Ai.Nodes.Tests
  • WorldNodesVixen.Ai.Nodes