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
All objects have the exact same wonky shape, weight and mass ...
... but are rotated a bit (between 0° and 5°)...
... which makes the impulses differ widely on impact
stephanbogner
changed the title
Reported values of get_contact_impulse not as expected
PhysicsDirectBodyState2D: Reported values of get_contact_impulse not as expected
Mar 27, 2024
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
The text was updated successfully, but these errors were encountered: