1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +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:46:21 +01:00
parent 87b2d3f9cf
commit a442526744
5 changed files with 26 additions and 3 deletions

View File

@@ -152,8 +152,10 @@ void BroadPhase2DBasic::update() {
void *data = nullptr;
if (pair_callback) {
data = pair_callback(elem_A->owner, elem_A->subindex, elem_B->owner, elem_B->subindex, unpair_userdata);
if (data) {
pair_map.insert(key, data);
}
}
pair_map.insert(key, data);
}
}
}