forked from LeenkxTeam/LNXSDK
1. added local rotation so that if the source object is child then it would still align to the target object. 2. removed rotation output socket since is not really needed.
This commit is contained in:
@ -29,6 +29,8 @@ class SetLookAtRotationNode(LnxLogicTreeNode):
|
||||
update=lambda self, context: self.update_sockets(context)
|
||||
)
|
||||
|
||||
|
||||
|
||||
damping: bpy.props.FloatProperty(
|
||||
name='Damping',
|
||||
description='Amount of damping for rotation (0.0 = instant, 1.0 = no movement)',
|
||||
@ -74,6 +76,12 @@ class SetLookAtRotationNode(LnxLogicTreeNode):
|
||||
('false', 'False', 'False')],
|
||||
name='Disable Rotation on Aligning Axis', default='false')
|
||||
|
||||
property5: HaxeEnumProperty(
|
||||
'property5',
|
||||
items = [('true', 'True', 'True'),
|
||||
('false', 'False', 'False')],
|
||||
name='Use Local Space', default='false')
|
||||
|
||||
def lnx_init(self, context):
|
||||
# Add inputs in standard order
|
||||
self.inputs.new('LnxNodeSocketAction', 'In')
|
||||
@ -90,8 +98,6 @@ class SetLookAtRotationNode(LnxLogicTreeNode):
|
||||
|
||||
# Add outputs
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
||||
# Add rotation output socket
|
||||
self.add_output('LnxRotationSocket', 'Rotation')
|
||||
|
||||
def draw_buttons(self, context, layout):
|
||||
# 1. Axis Selector
|
||||
@ -114,6 +120,7 @@ class SetLookAtRotationNode(LnxLogicTreeNode):
|
||||
self.property2 = 'true' if self.use_source_vector else 'false'
|
||||
self.property3 = str(self.damping) # Keep for backward compatibility
|
||||
self.property4 = 'true' if self.disable_rotation_on_align_axis else 'false'
|
||||
self.property5 = 'true' # Always use local space functionality
|
||||
|
||||
# Store current object references before changing sockets
|
||||
self.save_object_references()
|
||||
|
Reference in New Issue
Block a user