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:
There are several issues already discussing the problems of continuous collision detection, more specifically the fact that it seemingly does not work at all (see #16113 for instance). I made some more tests as this issue affects my project, and noticed some unexpected behavior.
First of all, it is expected that small, fast objects may tunnel through thin obstacles or other small objects if they travel more distance between two physics frames than the size of both objects. This is where continuous collision detection is supposed to prevent such behavior. However, while testing I noticed the following:
with continuous collision detection disabled, a rigid body with a single BoxShape never tunnels through a thin obstacle (see MRP below), even at speeds of 500 m/s at 60 physics FPS.
on the other hand, a compound rigid body (in this case two BoxShapes) can tunnel through the same obstacle, irrespective of whether continuous collision detection is enabled.
I have not tested other shapes, but it appears that having more than one collision shape in a rigid body causes it to ignore continuous collision detection, while single collision shape rigid bodies seem to always have CCD enabled.
Steps to reproduce:
Add a StaticBody with a thin BoxShape collision shape
Add a RigidBody with a small BoxShape collision shape
Throw/drop the rigid body into the static body at various velocities and CCD settings
Perform the same test after adding a second collision shape to the RigidBody
In this test project, there are two small rigid bodies that get thrown into a thin wall when you press the space bar. One of them has a single collision shape while the other has two. You can change the speed of both rigid bodies through the root node's exported variable.
At 60 physics FPS, tunnelling starts occurring for the second rigid body at an initial speed of 61 m/s.
The first rigid body will never tunnel, even at 500 m/s.
The text was updated successfully, but these errors were encountered:
Godot version:
v3.2.2, custom build 73b97e8
OS/device including version:
Linux Mint 19.3
Issue description:
There are several issues already discussing the problems of continuous collision detection, more specifically the fact that it seemingly does not work at all (see #16113 for instance). I made some more tests as this issue affects my project, and noticed some unexpected behavior.
First of all, it is expected that small, fast objects may tunnel through thin obstacles or other small objects if they travel more distance between two physics frames than the size of both objects. This is where continuous collision detection is supposed to prevent such behavior. However, while testing I noticed the following:
I have not tested other shapes, but it appears that having more than one collision shape in a rigid body causes it to ignore continuous collision detection, while single collision shape rigid bodies seem to always have CCD enabled.
Steps to reproduce:
Minimal reproduction project:
CollisionDetectionIssue.zip
In this test project, there are two small rigid bodies that get thrown into a thin wall when you press the space bar. One of them has a single collision shape while the other has two. You can change the speed of both rigid bodies through the root node's exported variable.
At 60 physics FPS, tunnelling starts occurring for the second rigid body at an initial speed of 61 m/s.
The first rigid body will never tunnel, even at 500 m/s.
The text was updated successfully, but these errors were encountered: