Closed agersant closed 4 years ago
Someone on Discord suggested calling IsTouching()
on the contact in the ContactList. It was false
after one call to Step
, and true after a second call.
This means contact listeners and the contact list are consistent (🥳 ). However, it is still unexpected that it takes two calls to Step() before a contact is reported. (renamed this ticket accordingly)
Fixed in #640
Thank you so much!
Make sure these boxes are checked before submitting your issue - thank you!
This was originally discovered through the Love2D bindings (https://github.com/love2d/love/issues/1617). I have now reproduced this issue in Box 2D
2.4.0
.The issue is as follow:
GetContactList()
returns a contact (as expected), butBeginContact
did not get calledIf this is intended, I think it should be documented under https://box2d.org/documentation/md__d_1__git_hub_box2d_docs_dynamics.html#autotoc_md105 Note that calling Step() one additional time makes the
BeginContact
listener get called. However, I would expect it to be called during the time step where the contact is detected and not the following one.I have attached an edited version of
hello_world.cpp
which reproduces the issue: hello_world.zipMany thanks in advance.