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

16 lines
554 B
Python

from lnx.logicnode.lnx_nodes import *
class GetVelocityNode(LnxLogicTreeNode):
"""Returns the world velocity of the given rigid body."""
bl_idname = 'LNGetVelocityNode'
bl_label = 'Get RB Velocity'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketObject', 'RB')
self.add_input('LnxBoolSocket', 'Linear On Local Axis')
self.add_input('LnxBoolSocket', 'Angular On Local Axis')
self.add_output('LnxVectorSocket', 'Linear')
self.add_output('LnxVectorSocket', 'Angular')