Moving CharacterBody3D manually breaks its detection by an Area3D

Godot Version

Godot 4.2.1.stable


I have a CharacterBody3D that is detected by an Area3D (with the body_entered signal). It works fine when I’m moving the character through move_and_slide(). However, after moving the character by setting its .global_position property manually (I do that, after stopping the navigation agent, to move the character while its on a NavigationLink3D), the Area3D does not detect it anymore.
Do you know what’s going on ?

I created a minimal reproducer project… that did not reproduce the problem. I will have to debug it further :blush: I’m leaving this open in the meantime.

Moving a physics body using its position or global position will de-sync the visual representation with the physics representation of the object. Try to avoid doing that.

I’m moving the whole CharacterBody3D, which embed the visual representation (MeshInstance3D) and its physics shape (CollisionShape3D), I’m not sure how that’s an issue, maybe we did not understand each other.

Anyway I found what caused my problem : I enabled the “Y-axis lock” option, which cause its CollisionShape3d to not change altitude (despite its debug position (displayed when "debug collision shape’ is enabled) being what I expected). Disabling this ‘Y-axis lock’ option fixed my problem.