armory/blender/arm/logicnode/input/LN_gamepad_coords.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

24 lines
809 B
Python

from arm.logicnode.arm_nodes import *
class GamepadCoordsNode(ArmLogicTreeNode):
"""Returns the coordinates of the given gamepad.
@seeNode Gamepad
@input Gamepad: the ID of the gamepad."""
bl_idname = 'LNGamepadCoordsNode'
bl_label = 'Gamepad Coords'
arm_version = 1
arm_section = 'gamepad'
def init(self, context):
super(GamepadCoordsNode, self).init(context)
self.add_output('ArmVectorSocket', 'Left Stick')
self.add_output('ArmVectorSocket', 'Right Stick')
self.add_output('ArmVectorSocket', 'Left Movement')
self.add_output('ArmVectorSocket', 'Right Movement')
self.add_output('ArmFloatSocket', 'Left Trigger')
self.add_output('ArmFloatSocket', 'Right Trigger')
self.add_input('ArmIntSocket', 'Gamepad')