FollowerEntity FloatingOrigin

  • A* version: 5.3.7
  • Unity version: 6.000.0.44f1

Apologies if this is not a supported use case. Is there a recommended way to get the FollowerEntity to work with large worlds/floating origin? I am just working with the FollowerEntity ECS components, not the Monobehaviour.

I have set up my project to place all graphs at 0,0,0 and transform entities LocalTransform into graph space before AIMovementSystemGroup runs and out of graph space after the group completes. It mostly works but there is some occasional warping caused by path repair.

There was another thread a long while ago about origin shifting. I don’t think it’s 100% helpful here but it could be, so I’ll link it: ProceduralGraphMover with RecastGraph long distance teleport problem

Otherwise this is a pretty advanced use case and I’ll have to get @aron_granberg to say where you should go from here.

Mind getting a video of this? I’m thinking this will be easier to diagnose visually.

Hi

Currently, the FollowerEntity assumes that it is in world space, and that the graph is also in the same space.

I suppose you could use your approach of transforming the coordinates before/after the AIMovementSystemGroup.
However, you’ll need to ensure the destination component is also transformed.
Right now, I think that is the best approach.

Assuming you actually need a moving origin. I’d say it’s only necessary if you plan on having coordinates larger than around 15000.