briansemrau / godot_box2d

A C++ module that integrates the Box2D library with the Godot game engine by providing nodes for standard Box2D objects.
MIT License
44 stars 4 forks source link

B2 kinematic bodies do not trigger contact callbacks #59

Closed briansemrau closed 3 years ago

briansemrau commented 3 years ago

Box2D does not trigger b2ContactListener.Begin/EndContact for kinematic/kinematic or kinematic/static body overlap. This is a limitation I did not consider when implementing areas.

This prevents Box2DArea nodes from emitting any body/area entered/exited signals whatsoever because they are kinematic. However, their damping and gravity effects still function because those effects are triggered and managed by the relevant dynamic bodies.

I'm not sure how to fix this aside from forking Box2D. Maybe there is some convoluted way to do it.

briansemrau commented 3 years ago

Easy enough: just change them to dynamic bodies 🧠 🤯