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:
Under certain circumstances, when colliding near the corner of a StaticBody2D, a RigidBody2D will report a collision, but the collision normal will be wrong. Furthermore, the RigidBody2D won't act as if it has collided with the StaticBody2D.
Steps to reproduce:
Send a high-speed RigidBody2D, with Contact Monitoring on, towards the corner of a StaticBody2D, watch it report a collision, report an incorrect collision normal, and act as if it hasn't collided.
It appears as if the collision solver provides the normal of the closest surface as the collision normal. However, when glancing a corner, the penetration may mean the object is closer to the opposite surface than the collision surface. The higher the speed, the greater the chance of an incorrect collision normal.
In the MRP provided, the speed is 500 pixels per second or 8.33 pixels per iteration. When glancing the corner at 45°, an overlap of up to seven pixels on each side of the 30 pixel thick platform are not even treated as a collision. This is normal for high-speed no CCD collision detection. However, a further 7 pixels on each side of the 30 pixel thick platform are detected as a collision, report the wrong normal and don't cause a collision response.
However, this is not just a high-speed problem, even at a mere 100 pixels per second i.e. 1.67 pixels a second, 1 pixel on each side of the 30 pixel thick platform is not detected as a collision, and 1 pixel reports the incorrect normal.
Godot version: 3.2.3.stable
OS/device including version: Ubuntu 20.04
Issue description:
Under certain circumstances, when colliding near the corner of a
StaticBody2D
, aRigidBody2D
will report a collision, but the collision normal will be wrong. Furthermore, theRigidBody2D
won't act as if it has collided with theStaticBody2D
.Steps to reproduce:
Send a high-speed
RigidBody2D
, withContact Monitoring
on, towards the corner of aStaticBody2D
, watch it report a collision, report an incorrect collision normal, and act as if it hasn't collided.It appears as if the collision solver provides the normal of the closest surface as the collision normal. However, when glancing a corner, the penetration may mean the object is closer to the opposite surface than the collision surface. The higher the speed, the greater the chance of an incorrect collision normal.
In the MRP provided, the speed is 500 pixels per second or 8.33 pixels per iteration. When glancing the corner at 45°, an overlap of up to seven pixels on each side of the 30 pixel thick platform are not even treated as a collision. This is normal for high-speed no CCD collision detection. However, a further 7 pixels on each side of the 30 pixel thick platform are detected as a collision, report the wrong normal and don't cause a collision response.
However, this is not just a high-speed problem, even at a mere 100 pixels per second i.e. 1.67 pixels a second, 1 pixel on each side of the 30 pixel thick platform is not detected as a collision, and 1 pixel reports the incorrect normal.
Minimal reproduction project:
RigidBodyCollisionNormal.zip
The text was updated successfully, but these errors were encountered: