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

RigidBody CylinderShape can temporarily penetrate a KinematicBody BoxShape upon landing #27212

Closed
rogeriodec opened this issue Mar 18, 2019 · 6 comments

Comments

@rogeriodec
Copy link

Godot version:
3.1

OS/device including version:
Windows 10 x64

Issue description:

The cylinder CollisionShape is going through the Box CollisionShape.

The cylinder is a RigidBody and the floor is a KinematicBody BoxShape.

I created a project from scratch and did only the scene that is in the image, without any modification other than resizing the CollisionShape cube and moving the cylinder CollisionShape up.

c

Steps to reproduce:
Run the attached project or just create a new one the follow the steps of the image above.

Minimal reproduction project:
CollisionShape.zip 2019-03-18 134353.zip

@jezv
Copy link

jezv commented Mar 18, 2019

BoxAndCylinder.zip
My hunch is this is to do with the cyclinder shape. Not sure how its implemented but using a box collision in the middle seems to result in more stable behaviour (see BoxAndCylinder.zip).

@rogeriodec
Copy link
Author

BoxAndCylinder.zip
My hunch is this is to do with the cyclinder shape. Not sure how its implemented but using a box collision in the middle seems to result in more stable behaviour (see BoxAndCylinder.zip).

Interesting approach. However, if the CollisionShape turns sideways, it will not behave like a cylinder, that is, it will not roll...

@rogeriodec
Copy link
Author

rogeriodec commented Apr 1, 2019

Studying a little, mainly based on this video, I realized that is not easy to calculate a precise collision.
But I saw that there is a continuous collision detection option, which theoretically might make a difference, but not.
Where this option would be effective?

@jezv
Copy link

jezv commented Apr 19, 2019

BoxAndCylinder.zip
My hunch is this is to do with the cyclinder shape. Not sure how its implemented but using a box collision in the middle seems to result in more stable behaviour (see BoxAndCylinder.zip).

Interesting approach. However, if the CollisionShape turns sideways, it will not behave like a cylinder, that is, it will not roll...

The box can be thinner than the cyclinder but slightly longer. See my attached BoxAndCyclinder.zip

@jitspoe
Copy link
Contributor

jitspoe commented Jul 11, 2019

I've had some rare instances with box-on-box collision penetrating, so even that's not 100% stable. Can't come up with a consistent repro case, though. Here's a clip of it happening: https://clips.twitch.tv/YawningDifferentCocoaTheTarFu

Character is a KinematicBody with a box shape using move_and_collide(). Box in the world is a StaticBody with a box shape.

@Calinou Calinou changed the title Serious bug with CollisionShape RigidBody CylinderShape can temporarily penetrate a KinematicBody BoxShape upon landing May 4, 2020
@Calinou
Copy link
Member

Calinou commented May 5, 2020

Duplicate of #16505.

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

5 participants