2025-01-22 16:18:30 +01:00
|
|
|
from lnx.logicnode.lnx_nodes import *
|
|
|
|
|
|
2026-09-04 10:46:13 -07:00
|
|
|
class SetRigidBodyFrictionNode (LnxLogicTreeNode):
|
2025-01-22 16:18:30 +01:00
|
|
|
"""Sets the friction of the given rigid body."""
|
2026-09-04 10:46:13 -07:00
|
|
|
bl_idname = 'LNSetRigidBodyFrictionNode'
|
2025-01-22 16:18:30 +01:00
|
|
|
bl_label = 'Set RB Friction'
|
2026-09-04 10:46:13 -07:00
|
|
|
lnx_section = 'props'
|
2025-01-22 16:18:30 +01:00
|
|
|
lnx_version = 1
|
|
|
|
|
|
|
|
|
|
def lnx_init(self, context):
|
2026-09-04 10:46:13 -07:00
|
|
|
self.add_input('LnxNodeSocketAction', 'In')
|
|
|
|
|
self.add_input('LnxNodeSocketObject', 'RB')
|
|
|
|
|
self.add_input('LnxFloatSocket', 'Friction', default_value=0.5)
|
|
|
|
|
self.add_input('LnxFloatSocket', 'Angular Friction', default_value=0.1)
|
2025-01-22 16:18:30 +01:00
|
|
|
|
2026-09-04 10:46:13 -07:00
|
|
|
self.add_output('LnxNodeSocketAction', 'Out')
|