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 collision against CSG Primitive doesn't always trigger on_body_entered signal #75018

Closed
Griiimon opened this issue Mar 17, 2023 · 9 comments

Comments

@Griiimon
Copy link

Griiimon commented Mar 17, 2023

Godot version

3.5 and 4

System information

Windows 10

Issue description

I had this issue in Godot 3.5 ( default physics engine ) that my ball ( Rigidbody, sphere collider ) wouldn't reliably report a contact (body_entered signal) with the CSGTorus Basketball hoop rim. I thought this was down to the torus.

Now I just went on a bug hunt with somebody on the Discord server and we figured out that he didn't get reliable contact reports in a completely different project ( Godot 4 ) between a Rigidbody with a capsule collider and a CSGBox.

In both cases neither our Rigidbodies, their collision shapes or the CSG Primitives were scaled via the transform. We observed the collisions happening, the Rigidbodies bouncing off when there was no signal. Most of the time the signal triggered correctly, though. Obviously, signals and reported contacts were setup correctly since we received signals.

Since CSG primitives are only supposed to be used in prototyping anyway i assume the priority to fix this wouldn't be very high. But it should be mentioned in the docs at least.

Steps to reproduce

run the scene, hold down left mouse button and shoot to the ground with this angle

test in both StaticBody3D and CSGBox

image

first person view

image

Minimal reproduction project

The reproduction project is for Godot 4!

csg-collider.zip

@venilark
Copy link

image
here with spheres and boxes

@Calinou
Copy link
Member

Calinou commented Mar 21, 2023

I can confirm this on 4.0.stable (Linux).

  • Doubling Physics Ticks Per Second (from 60 to 120) in the advanced Project Settings resolves the issue.
  • Doubling the CSGBox floor's thickness (while keeping Physics Ticks Per Second at its default 60) doesn't resolve the issue.

@substract
Copy link

Hello, I noticed there is also a problem with RigidBody3Ds colliding with CharacterBody3Ds that might be related!
This happens when a somewhat faster (but note extremely so) RigidBody3D hits a CharacterBody3Ds which is also moving in the same direction, but slower. The RigidBody3D hits and will then be in a "floaty" state, there is also no body_entered signal triggered.
Is that a known issiue? I couldn't find any reports on it.

@venilark
Copy link

venilark commented Apr 1, 2023

Hello, I noticed there is also a problem with RigidBody3Ds colliding with CharacterBody3Ds that might be related! This happens when a somewhat faster (but note extremely so) RigidBody3D hits a CharacterBody3Ds which is also moving in the same direction, but slower. The RigidBody3D hits and will then be in a "floaty" state, there is also no body_entered signal triggered. Is that a known issiue? I couldn't find any reports on it.

can confirm this, it happened to me, rigidbodies are completely unreliable right now

@rburing
Copy link
Member

rburing commented Apr 3, 2023

Sorry, I introduced this CCD bug in 4.0-stable and it remained in 4.0.1.

It's fixed by #74861 which is in 4.0.2-rc1.

@rburing rburing closed this as completed Apr 3, 2023
@substract
Copy link

Sorry, I introduced this CCD bug in 4.0-stable and it remained in 4.0.1.

It's fixed by #74861 which is in 4.0.2-rc1.

I just tested it in Godot 4.0.2 and the problem I described is still there, sadly :(

@venilark
Copy link

venilark commented Apr 4, 2023

Sorry, I introduced this CCD bug in 4.0-stable and it remained in 4.0.1.
It's fixed by #74861 which is in 4.0.2-rc1.

I just tested it in Godot 4.0.2 and the problem I described is still there, sadly :(

could you please upload a test project so they can see it in action?

@substract
Copy link

substract commented Apr 5, 2023

OK, here it is!

#75696

@venilark
Copy link

venilark commented Apr 15, 2023

Sorry, I introduced this CCD bug in 4.0-stable and it remained in 4.0.1.

It's fixed by #74861 which is in 4.0.2-rc1.

I still have this problem in 4.0.2

edit: it was the Area3D not triggering the on_body_entered signal sometimes

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