LNXSDK/leenkx/blender/lnx/logicnode/input/LN_gamepad_coords.py

23 lines
760 B
Python
Raw Normal View History

2025-01-22 16:18:30 +01:00
from lnx.logicnode.lnx_nodes import *
class GamepadCoordsNode(LnxLogicTreeNode):
"""Returns the coordinates of the given gamepad.
@seeNode Gamepad
@input Gamepad: the ID of the gamepad."""
bl_idname = 'LNGamepadCoordsNode'
bl_label = 'Gamepad Coords'
lnx_version = 1
lnx_section = 'gamepad'
def lnx_init(self, context):
self.add_output('LnxVectorSocket', 'Left Stick')
self.add_output('LnxVectorSocket', 'Right Stick')
self.add_output('LnxVectorSocket', 'Left Movement')
self.add_output('LnxVectorSocket', 'Right Movement')
self.add_output('LnxFloatSocket', 'Left Trigger')
self.add_output('LnxFloatSocket', 'Right Trigger')
self.add_input('LnxIntSocket', 'Gamepad')