1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-23 15:16:17 +00:00

Test collision mask before creating constraint pair in Godot physics

broadphase 2D and 3D.
This commit is contained in:
Marcel Admiraal
2020-06-08 17:18:23 +01:00
parent 776eb76018
commit 5794a4e11e
5 changed files with 26 additions and 5 deletions

View File

@@ -159,9 +159,12 @@ void BroadPhase2DBasic::update() {
if (pair_ok && !E) {
void *data = NULL;
if (pair_callback)
if (pair_callback) {
data = pair_callback(elem_A->owner, elem_A->subindex, elem_B->owner, elem_B->subindex, unpair_userdata);
pair_map.insert(key, data);
if (data) {
pair_map.insert(key, data);
}
}
}
}
}