summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2023-11-05 21:10:07 -0500
committerJonathan Bradley <jcb@pikum.xyz>2023-11-15 13:16:34 -0500
commit058dbf39d2b99af43a20334189bec3db36ffc53e (patch)
treef278f0b9c1e00636892525019618379bd38ff36e /src/game.cpp
parent0de2135165afb034a17d3307d2f4e263bcaae0f8 (diff)
actually update the filter groups when changed in the editor
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index d43e366..eac0965 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -964,6 +964,9 @@ void RecordImGui_CompInstPos(bool readonly, CompInstance *component) {
if (changed) {
instPos.posRot.setOrigin(pos);
instPos.posRot.setRotation(rot);
+ auto *broadphase = component->bt.rigidBody->getBroadphaseProxy();
+ broadphase->m_collisionFilterGroup = static_cast<PhysicsCollision_T>(component->physicsLayer);
+ broadphase->m_collisionFilterMask = static_cast<PhysicsCollision_T>(component->physicsMask);
ECS_UpdateInstance(component->entHandle, instPos, true);
}