I've been trying to get a Move Towards ability working with AStar pathfinding in UCC v3.04. It calculates the path fine, but the avatar doesn't move at all.
I had a look at the demo AStar integration scene and changed it to mirror my project - I moved the A Star AI Agent Movement ability above the Move Towards ability, as I believe this is how they must be ordered. And I unchecked Teleport on Early Stop on the Move Towards ability.
I then changed the code in the SetDestination test script:
//m_AstarAI = m_Character.GetComponent<IAstarAI>();
//m_AstarAI.destination = new Vector3(5, 0, 5);
UltimateCharacterLocomotion characterLocomotion = m_Character.GetComponent<UltimateCharacterLocomotion>();
MoveTowards moveTowards = characterLocomotion.GetAbility<MoveTowards>();
RichAI richAI = m_Character.GetComponent<RichAI>();
richAI.isStopped = true;
moveTowards.MoveTowardsLocation(new Vector3(5, 0, 5));
The demo character now doesn't move at all, like my project. I believe it's a problem with the A Star AI Agent Movement ability, in they way it works with Move Towards, but I've been stumped on what the problem actually is for a while.
I had a look at the demo AStar integration scene and changed it to mirror my project - I moved the A Star AI Agent Movement ability above the Move Towards ability, as I believe this is how they must be ordered. And I unchecked Teleport on Early Stop on the Move Towards ability.
I then changed the code in the SetDestination test script:
//m_AstarAI = m_Character.GetComponent<IAstarAI>();
//m_AstarAI.destination = new Vector3(5, 0, 5);
UltimateCharacterLocomotion characterLocomotion = m_Character.GetComponent<UltimateCharacterLocomotion>();
MoveTowards moveTowards = characterLocomotion.GetAbility<MoveTowards>();
RichAI richAI = m_Character.GetComponent<RichAI>();
richAI.isStopped = true;
moveTowards.MoveTowardsLocation(new Vector3(5, 0, 5));
The demo character now doesn't move at all, like my project. I believe it's a problem with the A Star AI Agent Movement ability, in they way it works with Move Towards, but I've been stumped on what the problem actually is for a while.