armory/blender/arm/logicnode/input/LN_get_touch_movement.py
Moritz Brückner 96aa0ee890 Use custom sockets for default data types
This allows to listen for socket updates for the live patch system
2021-07-10 21:46:44 +02:00

19 lines
727 B
Python

from arm.logicnode.arm_nodes import *
class GetTouchMovementNode(ArmLogicTreeNode):
"""Returns the movement values of the current touch event."""
bl_idname = 'LNGetTouchMovementNode'
bl_label = 'Get Touch Movement'
arm_section = 'surface'
arm_version = 1
def init(self, context):
super(GetTouchMovementNode, self).init(context)
self.add_input('ArmFloatSocket', 'X Multiplier', default_value=-1.0)
self.add_input('ArmFloatSocket', 'Y Multiplier', default_value=-1.0)
self.add_output('ArmFloatSocket', 'X')
self.add_output('ArmFloatSocket', 'Y')
self.add_output('ArmFloatSocket', 'Multiplied X')
self.add_output('ArmFloatSocket', 'Multiplied Y')