4.1.9 feedback and suggestions


#1

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:

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


#2

Hi

Thank you for these suggestions!

What exactly do you mean by this?


#3

“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.


#4

Hi

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
}