Why does the characterbody suddenly disappear?

Godot Version

4.2.1

Question

I created several CharacterBodies in Godot, which disappear after a short period of time. Some of them can still be displayed, but all of them can be seen in SceneTree. They haven’t been deleted, where have they gone?There is no error infomation.

Okay, I have already resolved it, just because I wrote distance_to as direction_to. But I still don’t know where the disappeared character went?

check the remote tab, there should be the characterbody2d, check its position
image

In insepector their positions are displayed as (0, 0), but when I output their positon, the result is (Nan, Nan)

Thank you for your reply. I have resolved the issue of the disappearance of the character body. My erroneous program accidentally causes the speed of the characterbody to be particularly high, and then they will disappear.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.