LNXSDK/leenkx/blender/lnx/logicnode/physics/LN_apply_torque.py
2025-01-22 16:18:30 +01:00

17 lines
544 B
Python

from lnx.logicnode.lnx_nodes import *
class ApplyTorqueNode(LnxLogicTreeNode):
"""Applies torque to the given rigid body."""
bl_idname = 'LNApplyTorqueNode'
bl_label = 'Apply Torque'
lnx_section = 'force'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxNodeSocketObject', 'RB')
self.add_input('LnxVectorSocket', 'Torque')
self.add_input('LnxBoolSocket', 'On Local Axis')
self.add_output('LnxNodeSocketAction', 'Out')