Speed change with A* Movement not working

longshotsg

New member
Hi,

I'm using Behavior Designer, A* Movement and Third Person Controller.
When I activate the ability speed change for an AI with a speed change multiplier, min, max, speed parameter to 200 from the default 2, the animator shows that speed parameter changes to 200. But the horizontalmovement and forwardmovement parameters are still capped at 1.0
200 is so I can see the change in speed clearly.

The demo scene(third person melee) uses navmesh and is able to change to 200 when I change to the value for speed change.
There's no example scene that shows BD with A* movement speed change ability to refer to.

I just can't find where I'm missing that my AI is not switching to the speed 200?
Thanks.
 
If the animator parameters aren't going above 1 then it sounds like the Speed Change ability isn't activating. Have you verified in the inspector that Speed Change is active?
 
Yes.
Speed change is active together with A* Movement.
Speed under Parameters in Animator of the non root motion AI character changes to the new speed 200.
But the horizontal and forward movement is always capped at 1.0 or -1.0

issue_1a.pngissue_1b.pngissue_1c.png
 
Last edited:
Have you gotten it to work with a non A* character? The Speed Change ability is unaware even if the character is an AI agent so you could get it to first work with a regular character and then copy the values over to the agent.

If you have scripting experience you can also start debugging within SpeedChange.Update. It sounds like the values may be unexpectedly clamped.
 
Yes the ability works for a user controller character.

In SpeedChange.Update, this value is always 0.
var inputVector = m_CharacterLocomotion.InputVector;
As a result, the resultant vector is the same (0,0);

Maybe you will have an idea why is it zero or where m_CharacterLocomotion.InputVector is populated from, so we can trace the issue.
Thanks.
 
Ok problem solved.
Apparently, order does matters.
A* must have set the input vector parameters as well.
When I switched the order of A* Movement and Speed change, the AI now moves perfectly as expected.
Thanks.

issue1a.png
 
Top