armory/blender/arm/logicnode/physics/LN_has_contact.py

16 lines
571 B
Python
Raw Normal View History

2017-04-08 00:34:45 +02:00
from arm.logicnode.arm_nodes import *
class HasContactNode(ArmLogicTreeNode):
2020-09-28 15:58:41 +02:00
"""Returns whether a rigid body has contact with another rigid body."""
2017-04-08 00:34:45 +02:00
bl_idname = 'LNHasContactNode'
bl_label = 'Has Contact'
arm_version = 1
2017-04-08 00:34:45 +02:00
def init(self, context):
super(HasContactNode, self).init(context)
2020-09-20 20:10:01 +02:00
self.add_input('ArmNodeSocketObject', 'Rigid Body 1')
self.add_input('ArmNodeSocketObject', 'Rigid Body 2')
self.add_output('NodeSocketBool', 'Has Contact')
2017-04-08 00:34:45 +02:00
add_node(HasContactNode, category=PKG_AS_CATEGORY, section='contact')