2017-04-08 00:34:45 +02:00
|
|
|
from arm.logicnode.arm_nodes import *
|
|
|
|
|
2020-09-08 21:16:20 +02:00
|
|
|
class HasContactNode(ArmLogicTreeNode):
|
2020-10-05 19:55:56 +02:00
|
|
|
"""Returns whether the given rigid body has contact with another given rigid body."""
|
2017-04-08 00:34:45 +02:00
|
|
|
bl_idname = 'LNHasContactNode'
|
|
|
|
bl_label = 'Has Contact'
|
2020-10-27 19:44:37 +01:00
|
|
|
arm_section = 'contact'
|
2020-09-13 11:27:58 +02:00
|
|
|
arm_version = 1
|
2017-04-08 00:34:45 +02:00
|
|
|
|
|
|
|
def init(self, context):
|
2020-09-13 11:27:58 +02:00
|
|
|
super(HasContactNode, self).init(context)
|
2020-10-05 19:55:56 +02:00
|
|
|
self.add_input('ArmNodeSocketObject', 'RB 1')
|
|
|
|
self.add_input('ArmNodeSocketObject', 'RB 2')
|
2020-09-20 20:10:01 +02:00
|
|
|
self.add_output('NodeSocketBool', 'Has Contact')
|