Browse Source

Fix regression introduced in 9339b29.

`math.cos()` expects an angle in radians. The tolerance property is in
degrees.
pull/399/head
Adam Johnson 3 months ago
parent
commit
dfa3bc9034
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 2
      korman/nodes/node_conditions.py

2
korman/nodes/node_conditions.py

@ -337,7 +337,7 @@ class PlasmaFacingTargetSocket(PlasmaNodeSocketBase, bpy.types.NodeSocket):
node = self.links[0].from_node
directional = node.directional
moving_forward = node.moving_forward
tolerance = math.cos(node.tolerance)
tolerance = math.cos(math.radians(node.tolerance))
else:
# This is a programmer failure, so we need a traceback.
raise RuntimeError("Tried to export an unused PlasmaFacingTargetSocket")

Loading…
Cancel
Save