MoveToPosition does not work directly after server was created

Describe the bug:
When server only only started, for a minute or so (depends on size of map, etc) NPC would not move properly. That is calling MoveToPosition would cause no effect whatsoever, including possibly not called callback.

Not completely sure here, because I did not do all the scripts, which control NPCs in my game, but I think maybe callback is actually called. The problem is that I don’t really see a way how at the moment when it is called I am to understand what to do. Because failed move is pretty standard situation in my games - NPCs get interrupted on their patrol quite regularly and if I would be resetting the same movement each time that happens (what is required to do in the beginning of the game to avoid this bug), then it would be a performance problem, not to say that the logic would be quite complicated

This happens on both preview and actual published game, regardless.

How do you cause this bug?

  • Make big enough map
  • Create script which relies on MoveToPosition to actually move NPC somewhere, call it immediately after NPC spawn

expected that script will work, but in reality NPC would be stuck in the air for a bit and eventually would land, but would completely ignore MoveToPosition and would stay in place forever

Screenshots / video of bug:
A bit small picture, but this here you can see NPC stuck in the air
After that period is ended, eventually they would land, but would ignore requirement to go somewhere and stay stuck in place forever, because script expects them to actually move.

Which platform: PC

Which input: keyboard + mouse

Your Crayta username: strowk

Game seen in (including “Hub” or “Editor for XYZ”): Editor of Champion’s Bounty

How regularly do you see this? (E.g. 2/3 times - please try 3 times if possible): always if NPC is created quickly after the start of the game

Time + date seen: 29.07.2022

Version number (found in Help tab in Settings): 0.g2.53.127708

UPD: I figured a clever workaround for this issue actually. I made a special NPC called walker. The sole purpose of walker is to walk from point A where he spawns to point B in couple of meters from point A. Once walker had made his exciting journey, all other NPCs in game are allowed to start their processes, cause now they can all walk (the walking initiation or whatever it is that makes them fly in the beginning - it kinda ends up for all of them simultaneously).

Hi @str,

I just wanted to check in with you and see if there still appears to be a bug here even though you’ve found a workaround? Is the original report still something we should look in to?


I really think original bug should be fixed or at least API provided that makes NPCs usable right away or notifies when they are usable… workaround is kinda ugly

Hi @str,

Thanks, I’ve reproduced the issue and logged a bug report.