LNXSDK/leenkx/blender/lnx/logicnode/physics/LN_set_rb_velocity.py

18 lines
701 B
Python
Raw Normal View History

2025-01-22 16:18:30 +01:00
from lnx.logicnode.lnx_nodes import *
class SetVelocityNode(LnxLogicTreeNode):
"""Sets the velocity of the given rigid body."""
bl_idname = 'LNSetVelocityNode'
bl_label = 'Set RB Velocity'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxNodeSocketObject', 'RB')
self.add_input('LnxVectorSocket', 'Linear')
self.add_input('LnxVectorSocket', 'Linear Factor', default_value=[1.0, 1.0, 1.0])
self.add_input('LnxVectorSocket', 'Angular')
self.add_input('LnxVectorSocket', 'Angular Factor', default_value=[1.0, 1.0, 1.0])
self.add_output('LnxNodeSocketAction', 'Out')