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

Small Rectangle Shape Behavior #38043

Closed
eldidou opened this issue Apr 20, 2020 · 2 comments
Closed

Small Rectangle Shape Behavior #38043

eldidou opened this issue Apr 20, 2020 · 2 comments

Comments

@eldidou
Copy link
Contributor

eldidou commented Apr 20, 2020

Godot version:
v3.2.1.stable.official

OS/device including version:
Ubuntu 19.04

Issue description:
When using rectangleShape with a small scale (when the RectangleShape extents multiplied by the collision shape scale is equal to 0.5 or less), if the shapes are subject to forces (like gravity) they overlap (among themselves, and with other PhysicBodies).
This is does not happen when the shape is just slightly bigger (0.6 for example), or when using another collision shape (CircleShape for example)
Screenshot from 2020-04-20 14-01-12

Steps to reproduce:

  • Create several (~5) RigidBody2D
    with a RectangleShape with an extents of 0.5
    with same transform.y value
    slightly spaced on the x axis
  • Reduce the default gravity to 5
  • Add a StaticBody below the rigid bodies

Minimal reproduction project:
rectangleShapeOverlap.zip

@pwab
Copy link

pwab commented May 3, 2020

I was able to reproduce this with your sample on my Windows 10 machine. I was able to stop the bodies from sinking by manipulating the physics_fps parameter in ProjectSettings to a value way beyond 120 (try 1000 if you want).

By the way this problem is known for quite a while:
https://www.reddit.com/r/godot/comments/7w5i47/physics_low_accuracy/

So this seems to be a duplicate of #16505 and #2092.

@Calinou
Copy link
Member

Calinou commented May 3, 2020

Duplicate of #16505 and #2092.

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

No branches or pull requests

4 participants