4.1.9 feedback and suggestions


I was having to add a lot of hacks to AIPath in 4.011. For example, controlling orientation myself, and finding out what the next waypoint is. Once I upgraded to pro (4.1.9) I was able to take a lot of the hacks out, so this is a big improvement.

Here’s a few things I still had to change, which I am listing as suggestions:
Make acceleration a public member.
Let me pass a graph mask to AIBase
Allow for strafe movement, at reduced speed
Allow me to pass a precalculated path. I do this because I get a path to find out if a target is reachable before I start walking to it. I’m currently doing something like this:

// Act as if a new search had been requested
// Run modifiers
seeker.RunModifiers(Seeker.ModifierPass.PostProcess, asynchPathCallback.multiTargetPath);
// Act as if a new search had been completed



Thank you for these suggestions!

What exactly do you mean by this?


“Allow for strafe movement, at reduced speed”

I found slowWhenNotFacingTarget so nevermind.

An additional suggestion is to allow the user to override with physics based movement, which I’m adding now. Instead of rigid.MovePosition(currentPosition) I am using forces to move.So I have to make FinalizePosition a virtual public member, then override it.



It is possible to do movement in another way without having even to subclass the AI:

void Update () {
	// Disable the AIs own movement code
	ai.canMove = false;

	Vector3 nextPosition;
	Quaternion nextRotation;
	ai.MovementUpdate(Time.deltaTime, out nextPosition, out nextRotation);

	// Do custom movement here
	// or call ai.FinalizeMovement(nextPosition, nextRotation); for the default behaviour