I using pro-version.
Pathfind-type: Recast.
Small map, small objects and short cuts.
The agent ALMOST INCIDES to a destination that is not blocked. And the endless movement to this point begins, then the agent passes by and tries to bring it back.
Every 3-10 secods animal going to random point. Animation RUN work, if AIPath.velocity != Vector.zero
All settings, logs in video: https://youtu.be/oOt1JwN_Lz8?t=8
Does your “Enemy” script apply any sort of movement? I see that it has a velocity field.
Are you using the RVONavmesh component somewhere in your scene?
Is any sort of root motion being applied?
Enemy every 3-10 seconds a random point is selected, but the countdown of this time begins half as soon as it approaches the previous (reach) point at 0.6.
public class EnemyStateWander : State {
public float nextWanderTime { get; private set; }
public Enemy actor { get { return (Enemy) machine; } }
public override void Enter() {
base.Enter();
actor.aiPath.destination = MovingUtils.RandomPoint(actor.spawnPosition, actor.homeRadius);
//actor.SetRunning(true);
}
public override void Execute() {
base.Execute();
if (!actor.aiPath.hasPath) {
return;
}
Debug.Log("==================== end path");
nextWanderTime = Time.time + Random.Range(5.0f, 10.0f);
//actor.SetRunning(false);
actor.ChangeState<CreatureStateIdle>();
}
}
Entered to this State, if nextWanderTime < Time.time.
Hmm… I’m not sure what could be the issue.
Do you get the same result if you try to create a new simple agent without any animation and other scripts? Just using the AIPath+Seeker scripts and optionally the AIDestinationSetter component.