diff --git a/korman/exporter/physics.py b/korman/exporter/physics.py index 0a6a0e9..9532009 100644 --- a/korman/exporter/physics.py +++ b/korman/exporter/physics.py @@ -173,7 +173,10 @@ class PhysicsConverter: physical.mass = mod.mass _set_phys_prop(plSimulationInterface.kStartInactive, simIface, physical, value=mod.start_asleep) - elif not mod.avatar_blocker: + elif mod.dynamic_blocker and not mod.avatar_blocker: + physical.collideGroup = (1 << plSimDefs.kGroupDynamic) + physical.memberGroup = plSimDefs.kGroupLOSOnly + elif not mod.avatar_blocker and not mod.dynamic_blocker: physical.memberGroup = plSimDefs.kGroupLOSOnly else: physical.memberGroup = plSimDefs.kGroupStatic diff --git a/korman/properties/modifiers/physics.py b/korman/properties/modifiers/physics.py index bf4c7ff..d972b91 100644 --- a/korman/properties/modifiers/physics.py +++ b/korman/properties/modifiers/physics.py @@ -69,18 +69,42 @@ class PlasmaCollider(PlasmaModifierProperties): bl_icon = "MOD_PHYSICS" bl_description = "Simple physical collider" - bounds = EnumProperty(name="Bounds Type", description="", items=bounds_types, default="hull") - - avatar_blocker = BoolProperty(name="Blocks Avatars", description="Object blocks avatars", default=True) - camera_blocker = BoolProperty(name="Blocks Camera LOS", description="Object blocks camera line-of-sight", default=True) - - friction = FloatProperty(name="Friction", min=0.0, default=0.5) - restitution = FloatProperty(name="Restitution", description="Coefficient of collision elasticity", min=0.0, max=1.0) - terrain = BoolProperty(name="Terrain", description="Object represents the ground", default=False) - - dynamic = BoolProperty(name="Dynamic", description="Object can be influenced by other objects (ie is kickable)", default=False) - mass = FloatProperty(name="Mass", description="Mass of object in pounds", min=0.0, default=1.0) - start_asleep = BoolProperty(name="Start Asleep", description="Object is not active until influenced by another object", default=False) + bounds = EnumProperty(name="Bounds Type", + description="", + items=bounds_types, + default="hull") + + avatar_blocker = BoolProperty(name="Blocks Avatars", + description="Object blocks avatars", + default=True) + camera_blocker = BoolProperty(name="Blocks Camera LOS", + description="Object blocks camera line-of-sight", + default=True) + dynamic_blocker = BoolProperty(name="Blocks Dynamics", + description="Object blocks dynamic objects (kickables)", + default=True) + + friction = FloatProperty(name="Friction", + min=0.0, + default=0.5) + restitution = FloatProperty(name="Restitution", + description="Coefficient of collision elasticity", + min=0.0, + max=1.0) + terrain = BoolProperty(name="Terrain", + description="Object represents the ground", + default=False) + + dynamic = BoolProperty(name="Dynamic", + description="Object can be influenced by other objects (ie is kickable)", + default=False) + mass = FloatProperty(name="Mass", + description="Mass of object in pounds", + min=0.0, + default=1.0) + start_asleep = BoolProperty(name="Start Asleep", + description="Object is not active until influenced by another object", + default=False) proxy_object = PointerProperty(name="Proxy", description="Object used as the collision geometry", @@ -118,9 +142,12 @@ class PlasmaSubworld(PlasmaModifierProperties): default="auto", options=set()) gravity = FloatVectorProperty(name="Gravity", - description="Subworld's gravity defined in feet per second squared", - size=3, default=(0.0, 0.0, -32.174), precision=3, - subtype="ACCELERATION", unit="ACCELERATION") + description="Subworld's gravity defined in feet per second squared", + size=3, + default=(0.0, 0.0, -32.174), + precision=3, + subtype="ACCELERATION", + unit="ACCELERATION") def export(self, exporter, bo, so): if self.is_dedicated_subworld(exporter): diff --git a/korman/ui/modifiers/physics.py b/korman/ui/modifiers/physics.py index c8d83a2..2160ade 100644 --- a/korman/ui/modifiers/physics.py +++ b/korman/ui/modifiers/physics.py @@ -22,6 +22,7 @@ def collision(modifier, layout, context): col = split.column() col.prop(modifier, "avatar_blocker") col.prop(modifier, "camera_blocker") + col.prop(modifier, "dynamic_blocker") col.prop(modifier, "terrain") col = split.column()