godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.34k stars 21.06k forks source link

Regression in physics when using gridmaps in 3.2 (after 3.2.3-stable) #42542

Closed jamie-pate closed 4 years ago

jamie-pate commented 4 years ago

Godot version:

904773149d0f7ea6b71d532c5332bcf6ba6335b5..28822847954620eabef372a866f8e94522529a39 Godot Engine v3.2.4.beta.custom_build.904773149 - https://godotengine.org OS/device including version:

OpenGL ES 3.0 Renderer: GeForce GTX 1070 with Max-Q Design/PCIe/SSE2 Linux Pop!_OS 20.04 LTS

Issue description:

GridMap collision shapes seem to apply randomly https://streamable.com/b0rsyw physics-regression-2020-10-03_14 12 06-sm-5fps

Steps to reproduce: Create a scene that has a gridmap that uses collisionshapes inside the gridmap.

Minimal reproduction project:

platformer.zip

akien-mga commented 4 years ago

Please try the latest 3.2 commit (fbf5c1cea8337bb2adf0d542a43a797a7414337f), it's a fast moving target :)

jamie-pate commented 4 years ago

Sorry i should have put in a range, I tried the tip first, i'll double check

akien-mga commented 4 years ago

Yeah I can reproduce it too in the latest 3.2 (28822847954620eabef372a866f8e94522529a39).

CC @madmiraal

madmiraal commented 4 years ago

I haven't checked, but it may be a related to #42462, which was fixed with #42500, but hasn't been cherry-picked yet.

akien-mga commented 4 years ago

Ah yeah I forgot that I haven't cherry-picked it yet. Will do later today.

capnm commented 4 years ago

I took a quick look at the demo, the tiles template is broken, the tiles use ConcavePolygonShape so I actually wonder that it works at all ...

grafik

WARNING: The method set_friction has been deprecated and will be removed in the future, use physics material instead.
     at: set_friction (scene/3d/physics_body.cpp:631)
WARNING: The method set_bounce has been deprecated and will be removed in the future, use physics material instead.
     at: set_bounce (scene/3d/physics_body.cpp:658)
...
warning btCollisionDispatcher::needsCollision: static-static collision!
capnm commented 4 years ago

I can confirm, #42500 fixes the CollisionShape transform issue: grafik

akien-mga commented 4 years ago

Fixed by #42500.