armory/blender/arm/logicnode/object/LN_get_distance.py
2020-11-17 12:01:15 -03:00

18 lines
614 B
Python

from arm.logicnode.arm_nodes import *
class GetDistanceNode(ArmLogicTreeNode):
"""Returns the euclidian distance between the two given objects.
@see For distance between two locations, use the `Distance` operator
in the *[`Vector Math`](#vector-math)* node."""
bl_idname = 'LNGetDistanceNode'
bl_label = 'Get Distance'
arm_version = 1
def init(self, context):
super(GetDistanceNode, self).init(context)
self.add_input('ArmNodeSocketObject', 'Object')
self.add_input('ArmNodeSocketObject', 'Object')
self.add_output('NodeSocketFloat', 'Distance')