You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following the first 3D game tutorial with Godot 4 I run into the issue when upon instantiating the mob there is unexpected collision occurring in the exact middle position of the playing field, which presumably is the 0,0,0 position.
bug.mp4
The logic here is very simple. When the timer triggers in the Main scene to spawn a mob:
I also tried enabling the Mob's CollisionShape3D Disabled parameter using the inspector and then adding to the bottom of mob.gd's initialize():
$CollisionShape3D.set_deferred("disabled", false)
Behaviour is the same, which is strange as the Mob position is absolutely set before enabling collisions.
Perhaps something changed in Godot 4 and I'm doing it wrong but it feels like there is a single-tick delay on updating the collision's position somehow, as graphically (including with debug show hitboxes) everything looks good and collision with mobs also works properly.
Godot version
4.0 master e17c29a
System information
Debian bookworm (testing)
Issue description
Following the first 3D game tutorial with Godot 4 I run into the issue when upon instantiating the mob there is unexpected collision occurring in the exact middle position of the playing field, which presumably is the 0,0,0 position.
bug.mp4
The logic here is very simple. When the timer triggers in the Main scene to spawn a mob:
I also tried enabling the Mob's CollisionShape3D Disabled parameter using the inspector and then adding to the bottom of
mob.gd
'sinitialize()
:Behaviour is the same, which is strange as the Mob position is absolutely set before enabling collisions.
Perhaps something changed in Godot 4 and I'm doing it wrong but it feels like there is a single-tick delay on updating the collision's position somehow, as graphically (including with debug show hitboxes) everything looks good and collision with mobs also works properly.
Changing Mob like this:
Resolves the issue, which makes me believe it is indeed a "tick 0" issue where somehow the collision's position is not updated properly.
Steps to reproduce
Open up attached project and play.
Minimal reproduction project
squash_the_creeps.zip
The text was updated successfully, but these errors were encountered: