Browse Source

Add support for pushable objects

I assume these are going to be necessary if we want to add the ball back
to the Watcher's Pub.
pull/193/head
Darryl Pogue 4 years ago
parent
commit
011aa017ac
No known key found for this signature in database
GPG Key ID: CB824715C3E6FD41
  1. 2
      korman/exporter/physics.py
  2. 1
      korman/properties/modifiers/physics.py
  3. 3
      korman/ui/modifiers/physics.py

2
korman/exporter/physics.py

@ -175,6 +175,8 @@ class PhysicsConverter:
physical.mass = mod.mass physical.mass = mod.mass
_set_phys_prop(plSimulationInterface.kStartInactive, simIface, physical, _set_phys_prop(plSimulationInterface.kStartInactive, simIface, physical,
value=mod.start_asleep) value=mod.start_asleep)
_set_phys_prop(plSimulationInterface.kAvAnimPushable, simIface, physical,
value=mod.pushable)
elif not mod.avatar_blocker: elif not mod.avatar_blocker:
physical.memberGroup = plSimDefs.kGroupLOSOnly physical.memberGroup = plSimDefs.kGroupLOSOnly
else: else:

1
korman/properties/modifiers/physics.py

@ -61,6 +61,7 @@ class PlasmaCollider(PlasmaModifierProperties):
dynamic = BoolProperty(name="Dynamic", description="Object can be influenced by other objects (ie is kickable)", 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) 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) start_asleep = BoolProperty(name="Start Asleep", description="Object is not active until influenced by another object", default=False)
pushable = BoolProperty(name="Pushable", description="Object can be pushed by the avatar (with pushing animation)", default=False)
def export(self, exporter, bo, so): def export(self, exporter, bo, so):
# All modifier properties are examined by this little stinker... # All modifier properties are examined by this little stinker...

3
korman/ui/modifiers/physics.py

@ -34,6 +34,9 @@ def collision(modifier, layout, context):
row = col.row() row = col.row()
row.active = modifier.dynamic row.active = modifier.dynamic
row.prop(modifier, "start_asleep") row.prop(modifier, "start_asleep")
row = col.row()
row.active = modifier.dynamic
row.prop(modifier, "pushable")
col = split.column() col = split.column()
col.active = modifier.dynamic col.active = modifier.dynamic

Loading…
Cancel
Save