Accessing bodyInterface inside a contact listener causes a crash. #160
DennisSmolek
started this conversation in
General
Replies: 1 comment 2 replies
-
If you use BodyInterface within a ContactListener callback you'll do a double-lock of the body because the physics sim has locked all bodies at that point. This is documented here. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working on conveyor belt systems from the example and already had my own method to get rotation which uses
BodyInterface.GetRotation(this.BodyID)
I couldn't figure out what was crashing things until I isolated that.
When you call
Body.GetRotation()
it works fine, but if you try and accessBodyInterface
it crashes.I confirmed this behavior with
AddImpulse()
as well.Edited to add:
The crash is caused when you are inside:
Beta Was this translation helpful? Give feedback.
All reactions