diff --git a/leenkx/blender/lnx/logicnode/physics/LN_any_contact.py b/leenkx/blender/lnx/logicnode/physics/LN_any_contact.py new file mode 100644 index 00000000..f915979f --- /dev/null +++ b/leenkx/blender/lnx/logicnode/physics/LN_any_contact.py @@ -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')