Add multiplier to FollowerEntity movement speed (Pure ECS)

  • A* version: [5.4.3]
  • Unity version: [6000.2.5f1]

Hello!
I’m making use of the FollowerEntity baker released in one of the recent beta versions and I’m wanting to add a speed modifier to these agents. I’ve tried my best to pick apart the scripts in the package to see where I’d need to make changes, but (as expected) it’s a rather large and complicated asset lol.
But I can see that at least I need to add the modifier to either the MovementSettings component or the ResolvedMovement component (or both?). But I’m not sure which systems/jobs I need to apply the modifier to the agent speed.

Any help would be much appreicated <3

And just setting ai.maxSpeed doesn’t cut it?

Well, I have a fairly complex system of things like Status Effects and attributes that can all effect movement speed, as well as different AIs that will have different default speeds. So, I’d like to be able to have the maxSpeed be the AI’s default speed while being able to set the multiplier as needed.

I must admit to also being confused. Surely you can track the default speeds and modified/current speeds in separate variables, and then set ai.maxSpeed to match them?

I suppose I could do that as a work around, but as stated in the title my project is pretty much pure ECS so I thought it would have been simpler to have a multiplier on the same component that the speed is contained in.

Sure.

There’s no internal multiplier field that you can use. But you can adjust the speed on the MovementSettings component, based on your own source speed and multiplier.