/// ---------------------------------------------
/// Ultimate Character Controller
/// Copyright (c) Opsive. All Rights Reserved.
/// https://www.opsive.com
/// ---------------------------------------------
namespace Opsive.UltimateCharacterController.Character.Abilities.AI
{
using UnityEngine;
///
/// Base class for moving the character with a pathfinding implementation.
///
public abstract class PathfindingMovement : Ability
{
public override bool IsConcurrent { get { return true; } }
///
/// Returns the desired input vector value. This will be used by the Ultimate Character Locomotion componnet.
///
public abstract Vector2 InputVector { get; }
///
/// Returns the desired rotation value. This will be used by the Ultimate Character Locomotion component.
///
public abstract Vector3 DeltaRotation { get; }
///
/// Sets the destination of the pathfinding agent.
///
/// The position to move towards.
/// True if the destination was set.
public abstract bool SetDestination(Vector3 target);
///
/// Updates the character's input values.
///
public override void Update()
{
m_CharacterLocomotion.InputVector = InputVector;
}
///
/// Updates the character's rotation values.
///
public override void UpdateRotation()
{
m_CharacterLocomotion.DeltaRotation = DeltaRotation;
}
}
}