Open stephanbogner opened 7 months ago
A different setup (bug-contact-impulse.zip):
Thanks for the MRP!
I haven't looked into this myself but others have made PRs for it. Can you test the PR https://github.com/godotengine/godot/pull/81654 and comment on whether it fixes the issue?
@rburing Thanks for the reply.
I built from source (the other approaches mentioned on the page didn't work) and now generally it's much more in line with what I'd expect as an outcome ... but since I don't know enough about actual physics it's hard to say whether it's correct now or not though, but below are the results from my tests.
If you have a more clever idea for how to test properly I'd be happy to make more tests.
Tested versions
Tested in:
System information
Godot v4.2.1.stable - macOS 14.1.2 - Vulkan (Forward+) - integrated Apple M2 Pro - Apple M2 Pro (10 Threads)
Issue description
Context:
I try to make breakable objects and wanted to use get_contact_impulse for this case do detect "hits".
Problem:
How strong the impulses are seem almost random ... but is hard to test in a reproducible way
My physics lab setup 😂:
_integrate_forces
-cycle)Outcome:
Note
I am not 100% sure if these are bugs or I am misunderstanding the concept of what
get_contact_impulse
is reporting.Steps to reproduce
I recommend making a similar physics setup and playing around. Make sure you turn on
contact_monitoring
and set a value formax_contacts_reported
.I used the following code to track values:
Minimal reproduction project (MRP)
bug-contact-impulse.zip