armory/blender/arm/logicnode/physics/LN_get_rb_velocity.py
2020-11-17 12:01:15 -03:00

17 lines
605 B
Python

from arm.logicnode.arm_nodes import *
class GetVelocityNode(ArmLogicTreeNode):
"""Returns the world velocity of the given rigid body."""
bl_idname = 'LNGetVelocityNode'
bl_label = 'Get RB Velocity'
arm_version = 1
def init(self, context):
super(GetVelocityNode, self).init(context)
self.add_input('ArmNodeSocketObject', 'RB')
self.add_input('NodeSocketBool', 'Linear On Local Axis')
self.add_input('NodeSocketBool', 'Angular On Local Axis')
self.add_output('NodeSocketVector', 'Linear')
self.add_output('NodeSocketVector', 'Angular')