Browse Source

Only apply mass = 1 to animated physicals

pull/10/head
Adam Johnson 9 years ago
parent
commit
b255902b9e
  1. 4
      korman/exporter/physics.py
  2. 4
      korman/properties/modifiers/anim.py

4
korman/exporter/physics.py

@ -74,10 +74,6 @@ class PhysicsConverter:
simIface = self._mgr.add_object(pl=plSimulationInterface, bl=bo)
physical = self._mgr.add_object(pl=plGenericPhysical, bl=bo, name=name)
# libHSPlasma's default mass is evil. The issue is that CWE will only do PhysAnim
# aka non dynamic animated physicals if the mass != 0. The user can override this.
physical.mass = 1.0
simIface.physical = physical.key
physical.object = so.key
physical.sceneNode = self._mgr.get_scene_node(bl=bo)

4
korman/properties/modifiers/anim.py

@ -137,6 +137,10 @@ class PlasmaAnimationModifier(PlasmaModifierProperties):
phys = sim.physical.object
phys.setProperty(plSimulationInterface.kPhysAnim, True)
# If the mass is zero, then we will fail to animate. Fix that.
if phys.mass == 0.0:
phys.mass = 1.0
class LoopMarker(bpy.types.PropertyGroup):
loop_name = StringProperty(name="Loop Name",

Loading…
Cancel
Save