forked from LeenkxTeam/LNXSDK
Update Files
This commit is contained in:
33
leenkx/blender/lnx/logicnode/physics/LN_on_contact.py
Normal file
33
leenkx/blender/lnx/logicnode/physics/LN_on_contact.py
Normal file
@ -0,0 +1,33 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class OnContactNode(LnxLogicTreeNode):
|
||||
"""Activates the output when the rigid body make contact with
|
||||
another rigid body.
|
||||
|
||||
@option Begin: the output is activated on the first frame when the
|
||||
two objects have contact
|
||||
@option End: the output is activated on the frame after the last
|
||||
frame when the two objects had contact
|
||||
@option Overlap: the output is activated on each frame the object
|
||||
have contact
|
||||
"""
|
||||
bl_idname = 'LNOnContactNode'
|
||||
bl_label = 'On Contact'
|
||||
lnx_section = 'contact'
|
||||
lnx_version = 1
|
||||
|
||||
property0: HaxeEnumProperty(
|
||||
'property0',
|
||||
items = [('begin', 'Begin', 'The contact between the rigid bodies begins'),
|
||||
('overlap', 'Overlap', 'The contact between the rigid bodies is happening'),
|
||||
('end', 'End', 'The contact between the rigid bodies ends')],
|
||||
name='', default='begin')
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketObject', 'RB 1')
|
||||
self.add_input('LnxNodeSocketObject', 'RB 2')
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
||||
|
||||
def draw_buttons(self, context, layout):
|
||||
layout.prop(self, 'property0')
|
Reference in New Issue
Block a user