How do I specify max acceleration from deceleration separately?

Hello,

I am having an issue where setting a low max acceleration value, causes a seeker to not slow down fast enough, to make a turn to the next waypoint that is not directly ahead. My theory is that setting this value has actually affected both acceleration and deceleration.

Is there any way to set them separately? I would like for seekers that were asked to stop because there was another seeker in front of them, to not resume their pathing at max speed, but rather, gradually speed up. However, I don’t want this to affect their deceleration.

Hi

Deceleration and acceleration are not separated as they are pretty much equivalent from a math point of view (the script uses a 2D acceleration vector).
It is possible to set them separately, but it requires quite a lot of script tweaking.

Are you sure it is not the rotation speed of the agent that is too low? Make sure you are using a somewhat recent version (4.1.11+) where the agent calculates sideways acceleration limits separately from the forward/backward acceleration (the sideways acceleration is based on the maximum rotation speed).

Thanks for the reply. My current rotation speed is set to 32400 and I am on version 4.1.11. I can try updating to see if that helps.

I can also just change my logic, to where I add an extra delay before allowing the now-unblocked seeker to move, rather than trying to mess with acceleration. Nonetheless, I would love a more natural looking solution, if possible.

By the way, I am setting isStopped to true or false, to control when the seeker stops on being blocked, and resumes on being unblocked.

Just updated to 4.1.16 and the issue is still happening. Lowering acceleration makes seekers overshoot their next waypoint, when that waypoint involves them turning left or right.

Hi

I was just notified by another user that some debug code has managed to get into the released version.
If you open the MovementUtilities.cs script, find the line

sidewaysAcceleration = forwardsAcceleration;

and remove it.
That disabled the code that made sideways and forwards acceleration decoupled.

1 Like