Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CollisionShape2D with top_level has inconsistent position for physics #98741

Open
tGautot opened this issue Nov 1, 2024 · 1 comment
Open

Comments

@tGautot
Copy link

tGautot commented Nov 1, 2024

Tested versions

  • Reproductible in 4.4 dev3 and 4.3 stable

System information

Godot v4.4.dev3 - Windows 10 - Vulkan (Forward+) - NVIDIA 3060 Ti

Issue description

When dynamically adding a collision shape with top_level set and then placing it through its global_position, the effective position (used in the physics server) seems to differ, thus giving incorrect collisions.

Steps to reproduce

There are 2 scenes, in the project, for each. In the first one, there are 2 areas overlapping through 2 circle collision shapes. In the second scene one of the areas is left untuched, but the other one is created and placed dynamically at the exam same position as it was in the first node. Important: Note that it is added as a child of an "strangely" offset node.

You can run both scenes with "Visible Collision Shapes", in both case you should see the shapes overlap.
When the scenes are running you can left click to see the overlapping areas in the output console, in the first scene you should see something, while the second one should return an empty array.

Minimal reproduction project (MRP)

mrp-toplevelcollisionshape2d.zip

@tGautot
Copy link
Author

tGautot commented Nov 1, 2024

This is linked to #95641 (probably same underlying issue but lower scope) and #66710 (probably same issue but in 3D)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant