godotengine / godotengine/godot
CollisionPolygon2D sprite doesn't follow parent when set to "Top Level" while "Visible Collision Shapes" is on, although parent still collides.
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
Done in 4.3, vaguely remember this not being an issue in 4.2.x
### System information
Godot v4.3.stable (77dcf97d8) - Windows 10.0.22631 - Vulkan (Forward+) - integrated AMD Radeon(TM) Graphics (Advanced Micro Devices, Inc.; 31.0.12042.4) - AMD Ryzen 5 5600G with Radeon Graphics (12 Threads)
### Issue description
As the title says. This doesn't happen when set to "Show Behind", nor does it happen with CollisionShape2D.

As you can see, I can still manipulate the small object (which has gravity) by balancing it on top of me, showing I still have collision, while the sprite of the CollisionPolygon2D just hangs there.

This also happens in the editor when moving the parent, which the child should follow. (The marker is for the Node2D and background)
### Steps to reproduce
Just make a CharacterBody2D with some movement code and give it a CollisionPolygon2D as a child on the top level, while having visible collision shapes. The parent still collides according to the shape of the CollisionPolygon2D, but the sprite doesn't move. Just a small oversight in the source code, I assume.
### Minimal reproduction project (MRP)
[ayo-4.3.zip](https://github.com/user-attachments/files/16638325/ayo-4.3.zip)
No clue if I did it right. The description above should suffice though.
Contributor guide
Assessment
This issue has not been assessed yet.