Browse Source

Fixed style issues in IK Demo. Added a bit of static typing hints to the LookAt IK file to better fit the rest of the scripts

TwistedTwigleg 5 years ago
parent
commit
fdb0d77e88
1 changed files with 7 additions and 7 deletions
  1. 7 7
      3d/ik/addons/sade/ik_look_at.gd

+ 7 - 7
3d/ik/addons/sade/ik_look_at.gd

@@ -10,14 +10,14 @@ export(bool) var use_our_rotation_y = false
 export(bool) var use_our_rotation_z = false
 export(bool) var use_negative_our_rot = false
 export(Vector3) var additional_rotation = Vector3()
-export (bool) var position_using_additional_bone = false
-export (String) var additional_bone_name = ""
-export (float) var additional_bone_length = 1
+export(bool) var position_using_additional_bone = false
+export(String) var additional_bone_name = ""
+export(float) var additional_bone_length = 1
 export(bool) var debug_messages = false
 
-var skeleton_to_use
-var first_call = true
-var _editor_indicator = null
+var skeleton_to_use: Skeleton = null
+var first_call: bool = true
+var _editor_indicator: Spatial = null
 
 
 func _ready():
@@ -68,7 +68,7 @@ func update_skeleton():
 		return
 	
 	# Get the bone
-	var bone = skeleton_to_use.find_bone(bone_name)
+	var bone : int = skeleton_to_use.find_bone(bone_name)
 	
 	# If no bone is found (-1), then return (and optionally print an error)
 	if bone == -1: