Godot Version
4.2.2
Question
When spawning a new CharacterBody3D, the first physics frame doesn’t properly check it’s collision, how can I go around it?
I basically have a projectile spawning into the scene and I want to check if it’s within the bounds of the map, to check it I use the get_overlapping_bodies() function and if it isn’t in the returning array, I delete it.
The problem is that I run the check each frame(or every x number of frames) and in the frame that comes immediately after the spawning of the projectile the array always comes empty(in the next frames it performs at it should) which brakes some of the logic.
How can I solve or avoid the problem? I guess I could avoid checking the first frame but I would rather ask if there’s a more elegant solution first.
Thanks in advance !