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
Issue description:
When a KinematicBody moves through a Gridmap on the same layer, this error is thrown constantly:
recover_from_penetration: Condition "shape_idx < 0 || shape_idx >= cs->getNumChildShapes()" is true. Returned: false
<C++ Source> modules/bullet/space_bullet.cpp:1249 @ recover_from_penetration()
KinematicBody.gd:5 @ _physics_process()
This error shouldn't be thrown, the Gridmap has no colliders or physics on it, it's purely graphical.
Steps to reproduce:
Have a kinematic body use move_and_collide/slide to move through a Gridmap tile.
Example video attached: ExampleVIdeo.zip
This is not actually a physics problem, because it's correctly identifying that the StaticBody associated with the Mesh item has no CollisionShape. It's a problem with MeshLibraries (and related to #11888 which is about not being able to add shapes to a Mesh in a MeshLibrary). Basically, if the MeshLibraryItem has no shapes, it shouldn't be creating an associated StaticBody.
The case of a compound collision shape with zero child shapes was being treated as an error in recover_from_penetration, causing an early return from the function, which could cause the recovery from other shapes to be skipped. In fact recovering from a compound collision shape with zero child shapes is very easy: just ignore it. I implemented this in #59864 because the previous early return caused a pretty bad bug (see the issue linked there). Hence, this issue here can be closed as well.
I agree with @madmiraal that it would be better if GridMap somehow would not create static bodies without shapes. This should be discussed in a separate issue.
Godot version: 3.2.2.stable
OS/device including version: Windows 10
Issue description:
When a KinematicBody moves through a Gridmap on the same layer, this error is thrown constantly:
recover_from_penetration: Condition "shape_idx < 0 || shape_idx >= cs->getNumChildShapes()" is true. Returned: false
<C++ Source> modules/bullet/space_bullet.cpp:1249 @ recover_from_penetration()
KinematicBody.gd:5 @ _physics_process()
This error shouldn't be thrown, the Gridmap has no colliders or physics on it, it's purely graphical.
Steps to reproduce:
Have a kinematic body use move_and_collide/slide to move through a Gridmap tile.
Example video attached:
ExampleVIdeo.zip
Minimal reproduction project:
Physics Error repro.zip
The text was updated successfully, but these errors were encountered: