Add leenkx/blender/lnx/logicnode/physics/LN_any_contact.py

This commit is contained in:
2025-10-03 05:06:23 +00:00
parent e05d9d0237
commit b9b387803f

View File

@ -0,0 +1,25 @@
from lnx.logicnode.lnx_nodes import *
class AnyContactNode(LnxLogicTreeNode):
"""Activates the output when the rigid body of the connected object makes contact with
any other rigid body.
"""
bl_idname = 'LNAnyContactNode'
bl_label = 'Any Contact'
lnx_section = 'contact'
lnx_version = 1
property0: HaxeEnumProperty(
'property0',
items = [('begin', 'Begin', 'Contact with any object begins'),
('overlap', 'Overlap', 'Contact with any object is happening'),
('end', 'End', 'Contact with any object ends')],
name='', default='begin')
def lnx_init(self, context):
self.add_input('LnxNodeSocketObject', 'RB')
self.add_output('LnxNodeSocketAction', 'Out')
def draw_buttons(self, context, layout):
layout.prop(self, 'property0')