Skip to content

Commit fc03211

Browse files
Added interpolation functionality to ik_look_at node (#585)
1 parent 98ed996 commit fc03211

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

3d/ik/addons/sade/ik_look_at.gd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export(NodePath) var skeleton_path setget _set_skeleton_path
55
export(String) var bone_name = ""
66
export(int, "_process", "_physics_process", "_notification", "none") var update_mode = 0 setget _set_update
77
export(int, "X-up", "Y-up", "Z-up") var look_at_axis = 1
8+
export(float, 0.0, 1.0, 0.001) var interpolation = 1.0
89
export(bool) var use_our_rotation_x = false
910
export(bool) var use_our_rotation_y = false
1011
export(bool) var use_our_rotation_z = false
@@ -127,7 +128,7 @@ func update_skeleton():
127128
rest.origin = additional_bone_pos.origin - additional_bone_pos.basis.z.normalized() * additional_bone_length
128129

129130
# Finally, apply the new rotation to the bone in the skeleton.
130-
skeleton_to_use.set_bone_global_pose_override(bone, rest, 1.0, true)
131+
skeleton_to_use.set_bone_global_pose_override(bone, rest, interpolation, true)
131132

132133

133134
func _setup_for_editor():

0 commit comments

Comments
 (0)