2025-01-22 16:18:30 +01:00

26 lines
775 B
Python

from lnx.logicnode.lnx_nodes import *
class ApplyForceNode(LnxLogicTreeNode):
"""Applies force in the given rigid body.
@seeNode Apply Force At Location
@seeNode Apply Impulse
@seeNode Apply Impulse At Location
@input Force: the force vector
@input On Local Axis: if `true`, interpret the force vector as in
object space
"""
bl_idname = 'LNApplyForceNode'
bl_label = 'Apply Force'
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', 'Force')
self.add_input('LnxBoolSocket', 'On Local Axis')
self.add_output('LnxNodeSocketAction', 'Out')