Browse Source

Fix clickables warping to origin in PotS

pull/10/head v0.01
Adam Johnson 10 years ago
parent
commit
ca47e8569a
  1. 4
      korman/exporter/physics.py
  2. 3
      korman/nodes/node_conditions.py

4
korman/exporter/physics.py

@ -34,9 +34,7 @@ class PhysicsConverter:
if self._exporter().has_coordiface(bo):
mesh.update(calc_tessface=indices)
physical.pos = utils.vector3(mat.to_translation())
quat = mat.to_quaternion()
quat.normalize()
physical.rot = utils.quaternion(quat)
physical.rot = utils.quaternion(mat.to_quaternion())
# Physicals can't have scale...
scale = mat.to_scale()

3
korman/nodes/node_conditions.py

@ -73,9 +73,12 @@ class PlasmaClickableNode(PlasmaNodeBase, bpy.types.Node):
phys_name = "{}_ClickableLOS".format(clickable_bo.name)
simIface, physical = exporter.physics.generate_physical(clickable_bo, clickable_so, bounds, phys_name)
simIface.setProperty(plSimulationInterface.kPinned, True)
physical.setProperty(plSimulationInterface.kPinned, True)
if made_the_phys:
# we assume that the collision modifier will do this if they want it to be intangible
physical.memberGroup = plSimDefs.kGroupLOSOnly
if physical.mass == 0.0:
physical.mass = 1.0
physical.LOSDBs |= plSimDefs.kLOSDBUIItems
# Picking Detector -- detect when the physical is clicked

Loading…
Cancel
Save