Open jdrueckert opened 2 years ago
That's an interesting bug! One thing that comes to mind: single player vs multiplayer may well work differently here. In single player the game client attempts to "pause" the game on the in-game menu, yet as far as I recall that pausing is not actually total so it may well lead to weird behavior like that. Server-side never pauses since it is its own process, but single tries to freeze everything, but then not really because some UI bits etc still need to work etc ...
General Info
Started from source while testing https://github.com/Terasology/Behaviors/pull/92
What you were trying to do
I was debugging NPC behavior and movement and entered the in-game menu to switch into intellij, to check my breakpoint condition before continuing to debug.
What actually happened
On entering the in-game menu I saw the NPC I was observing and whose behavior I was debugging disappear. In my debug logs I noticed the following:
Can't update Trigger entity with a non-finite position/rotation?! Entity: EntityRef{id = 3380, netId = 0, prefab = 'WildAnimals:deer'}
while the entity tries moving to its current destinationThis is how it looks in-game (if you don't know where the entities are going):
https://user-images.githubusercontent.com/1448874/152125781-75d84f61-537c-40e5-b2c0-6fc78062c76a.mp4
How to reproduce
Additional Infos / Context
This seems to be a sporadic issue. My guess is that it only happens while we're in the process of moving the NPC along the previously computed path and it somehow ends up in an "invalid" state resulting in the engine logic (potentially something about character prediction or movement) to run into some failing check and porting the NPC to (0, 0, 0) to "fix" it? As (0, 0, 0) is somewhere below the surface, this doesn't really fix things, though.
@pollend can you explain to me in "simple words" what running into this code path means for an entity? Or rather, what it tells us about the entity' state / position / ...?
Log details