-
Notifications
You must be signed in to change notification settings - Fork 315
/
LN_apply_impulse_at_location.py
30 lines (25 loc) · 1.13 KB
/
LN_apply_impulse_at_location.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from arm.logicnode.arm_nodes import *
class ApplyImpulseAtLocationNode(ArmLogicTreeNode):
"""Applies impulse in the given rigid body at the given position.
@seeNode Apply Impulse
@seeNode Apply Force
@seeNode Apply Force At Location
@input Impulse: the impulse vector
@input Impulse On Local Axis: if `true`, interpret the impulse vector as in
object space
@input Location: the location where to apply the impulse
@input Relative Location: if `true`, use the location relative
to the objects location, otherwise use world coordinates
"""
bl_idname = 'LNApplyImpulseAtLocationNode'
bl_label = 'Apply Impulse At Location'
arm_section = 'force'
arm_version = 1
def arm_init(self, context):
self.add_input('ArmNodeSocketAction', 'In')
self.add_input('ArmNodeSocketObject', 'RB')
self.add_input('ArmVectorSocket', 'Impulse')
self.add_input('ArmBoolSocket', 'Impulse On Local Axis')
self.add_input('ArmVectorSocket', 'Location')
self.add_input('ArmBoolSocket', 'Relative Location')
self.add_output('ArmNodeSocketAction', 'Out')