Hi, I’m not sure if this is a bug or an intended behavior, but when I set the MaxWalkSpeed of an AI agent to 0, the Move To Location or Actor node succeeds after a certain period of time has passed.
The really strange thing is that the waiting time seems to be almost the same as the value of MaxWalkSpeed when I start the game (by default it’s 400). It’s as if the AI’s “mind” is walking normally, but the body remains still (which is quite creepy when you think about it ).
If I set MaxWalkSpeed to a very low value, for example 25, the agent slowly walks towards the destination, and everything is fine.
I mean that when I launch the game, the default value of MaxWalkSpeed is 400. At some point a function sets MaxWalkSpeed to 0, than Move To Location or Actor is called.
I don’t really need this behavior, it is something that I noticed by messing with the prototype.
To be honest, the waiting time might not be exactly the same as the time the agent would take to reach the destination at the default speed—it could be an internal timeout of the Move To Location or Actor node. I just find it curious that the movement doesn’t simply fail or wait for the agent to actually reach the destination.
Well, it seems to me the time is around 4-5 seconds.
To be clear, it is a BTTask, here’s the setup:
EventReceiveExecuteAI -> set MaxWalkSpeed to 0 -> call a custom event named GoToLocation
Event GoToLocation -> Move To Location or Actor, OnMoveFinished -> launch an animation routine
How often does it get called? Only once? Hm, should not really matter if MaxWalkSpeed is 0 anyway. Hold on, does the onMoveFinished actuality execute? Perhaps it cannot distinguish between a successful finish and a failed one. What if you replaced it with: