When i resize the game’s window some (weirdly not all) characters sometimes jump aorund on the screen. This isn’t purely visual, as their actual position changes also when it happens.
I’m using A* algorithm with nav region-nav agent setup for navigating, I’m not sure what other relevant context is needed, as i have no idea what could cause this issue.
Has anyone encountered it, and if so, what is the fix?
What you describe sounds like you position your characters depending on your screen resolution, either from within your path-finding algorithm or somewhere else. No matter where this happens, it is most likely a bad design choice and it would be better to keep note of your game state separately, then updating your game’s visually depending only on this current state. This will give you more flexibility with changes to your game’s window size later on.
In short: keep the game state in one place and keep your visualization in another. And do not change your game state from where you do your visualizations.
It seems the behavior you describe is depending mainly on your personal project and I doubt anyone who experienced this behavior can pinpoint what causes it without knowing more about your actual project setup and code. The description of your problem needs to be more precise in order to create a general fix, but feel free to tell more about it.
The thing is, i dont position my character based on resolution. Might be important detail, its happening with 3d nodes (nav region / nav agent 3d and a 3d model, but i have seen it happen with a placeholder meshinstance3d too before).