Browse Source

Open and save 3D IK demo in Godot 3.2

Aaron Franke 5 years ago
parent
commit
db7c9f162f
4 changed files with 117 additions and 0 deletions
  1. 32 0
      3d/ik/fabrik_ik.tscn
  2. 44 0
      3d/ik/fps/fps_example.tscn
  3. 31 0
      3d/ik/look_at_ik.tscn
  4. 10 0
      3d/ik/skeleton_ik.tscn

+ 32 - 0
3d/ik/fabrik_ik.tscn

@@ -85,7 +85,17 @@ __meta__ = {
 }
 }
 skeleton_path = NodePath("../../../BattleBot/Armature/Skeleton")
 skeleton_path = NodePath("../../../BattleBot/Armature/Skeleton")
 bone_name = "Head"
 bone_name = "Head"
+update_mode = 0
+look_at_axis = 1
+use_our_rotation_x = false
+use_our_rotation_y = false
+use_our_rotation_z = false
+use_negative_our_rot = false
 additional_rotation = Vector3( 90, 0, 0 )
 additional_rotation = Vector3( 90, 0, 0 )
+position_using_additional_bone = false
+additional_bone_name = ""
+additional_bone_length = 1.0
+debug_messages = false
 
 
 [node name="IK_FABRIK_Left_Arm" type="Spatial" parent="Camera/targets"]
 [node name="IK_FABRIK_Left_Arm" type="Spatial" parent="Camera/targets"]
 script = ExtResource( 8 )
 script = ExtResource( 8 )
@@ -95,8 +105,10 @@ __meta__ = {
 skeleton_path = NodePath("../../../BattleBot/Armature/Skeleton")
 skeleton_path = NodePath("../../../BattleBot/Armature/Skeleton")
 bones_in_chain = PoolStringArray( "Left_UpperArm", "Left_LowerArm" )
 bones_in_chain = PoolStringArray( "Left_UpperArm", "Left_LowerArm" )
 bones_in_chain_lengths = PoolRealArray( 1.97, 3 )
 bones_in_chain_lengths = PoolRealArray( 1.97, 3 )
+update_mode = 0
 chain_iterations = 10
 chain_iterations = 10
 limit_chain_iterations = false
 limit_chain_iterations = false
+reset_iterations_on_update = false
 use_middle_joint_target = true
 use_middle_joint_target = true
 
 
 [node name="target" type="Spatial" parent="Camera/targets/IK_FABRIK_Left_Arm"]
 [node name="target" type="Spatial" parent="Camera/targets/IK_FABRIK_Left_Arm"]
@@ -110,10 +122,17 @@ __meta__ = {
 }
 }
 skeleton_path = NodePath("../../../../../BattleBot/Armature/Skeleton")
 skeleton_path = NodePath("../../../../../BattleBot/Armature/Skeleton")
 bone_name = "Left_Hand"
 bone_name = "Left_Hand"
+update_mode = 0
+look_at_axis = 1
+use_our_rotation_x = false
+use_our_rotation_y = false
+use_our_rotation_z = false
+use_negative_our_rot = false
 additional_rotation = Vector3( 0, 0, 90 )
 additional_rotation = Vector3( 0, 0, 90 )
 position_using_additional_bone = true
 position_using_additional_bone = true
 additional_bone_name = "Left_LowerArm"
 additional_bone_name = "Left_LowerArm"
 additional_bone_length = 3.0
 additional_bone_length = 3.0
+debug_messages = false
 
 
 [node name="middle_joint_target" type="Spatial" parent="Camera/targets/IK_FABRIK_Left_Arm"]
 [node name="middle_joint_target" type="Spatial" parent="Camera/targets/IK_FABRIK_Left_Arm"]
 transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 7.16849, 0, -5.31922 )
 transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 7.16849, 0, -5.31922 )
@@ -132,7 +151,10 @@ __meta__ = {
 skeleton_path = NodePath("../../../BattleBot/Armature/Skeleton")
 skeleton_path = NodePath("../../../BattleBot/Armature/Skeleton")
 bones_in_chain = PoolStringArray( "Right_UpperArm", "Right_LowerArm", "Right_Hand" )
 bones_in_chain = PoolStringArray( "Right_UpperArm", "Right_LowerArm", "Right_Hand" )
 bones_in_chain_lengths = PoolRealArray( 1.97, 3, 1.2 )
 bones_in_chain_lengths = PoolRealArray( 1.97, 3, 1.2 )
+update_mode = 0
+chain_iterations = 0
 limit_chain_iterations = false
 limit_chain_iterations = false
+reset_iterations_on_update = false
 use_middle_joint_target = true
 use_middle_joint_target = true
 
 
 [node name="target" type="Spatial" parent="Camera/targets/IK_FABRIK_Right_Arm"]
 [node name="target" type="Spatial" parent="Camera/targets/IK_FABRIK_Right_Arm"]
@@ -146,7 +168,17 @@ __meta__ = {
 }
 }
 skeleton_path = NodePath("../../../../../BattleBot/Armature/Skeleton")
 skeleton_path = NodePath("../../../../../BattleBot/Armature/Skeleton")
 bone_name = "Right_Hand"
 bone_name = "Right_Hand"
+update_mode = 0
+look_at_axis = 1
+use_our_rotation_x = false
+use_our_rotation_y = false
+use_our_rotation_z = false
+use_negative_our_rot = false
 additional_rotation = Vector3( 0, 0, 90 )
 additional_rotation = Vector3( 0, 0, 90 )
+position_using_additional_bone = false
+additional_bone_name = ""
+additional_bone_length = 1.0
+debug_messages = false
 
 
 [node name="middle_joint_target" type="Spatial" parent="Camera/targets/IK_FABRIK_Right_Arm"]
 [node name="middle_joint_target" type="Spatial" parent="Camera/targets/IK_FABRIK_Right_Arm"]
 transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -6.34515, 0, -3.7843 )
 transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -6.34515, 0, -3.7843 )

+ 44 - 0
3d/ik/fps/fps_example.tscn

@@ -497,8 +497,17 @@ __meta__ = {
 }
 }
 skeleton_path = NodePath("../../../../BattleBot/Armature/Skeleton")
 skeleton_path = NodePath("../../../../BattleBot/Armature/Skeleton")
 bone_name = "Chest"
 bone_name = "Chest"
+update_mode = 0
 look_at_axis = 2
 look_at_axis = 2
+use_our_rotation_x = false
+use_our_rotation_y = false
+use_our_rotation_z = false
+use_negative_our_rot = false
 additional_rotation = Vector3( -10, 0, 0 )
 additional_rotation = Vector3( -10, 0, 0 )
+position_using_additional_bone = false
+additional_bone_name = ""
+additional_bone_length = 1.0
+debug_messages = false
 
 
 [node name="Camera" type="Camera" parent="KinematicBody/CameraHolder/Lean_Path/PathFollow/IK_LookAt_Chest"]
 [node name="Camera" type="Camera" parent="KinematicBody/CameraHolder/Lean_Path/PathFollow/IK_LookAt_Chest"]
 transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0 )
 transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0 )
@@ -515,7 +524,10 @@ __meta__ = {
 skeleton_path = NodePath("../../../../../../BattleBot/Armature/Skeleton")
 skeleton_path = NodePath("../../../../../../BattleBot/Armature/Skeleton")
 bones_in_chain = PoolStringArray( "Left_UpperArm", "Left_LowerArm", "Left_Hand" )
 bones_in_chain = PoolStringArray( "Left_UpperArm", "Left_LowerArm", "Left_Hand" )
 bones_in_chain_lengths = PoolRealArray( 1.97, 3, 0.1 )
 bones_in_chain_lengths = PoolRealArray( 1.97, 3, 0.1 )
+update_mode = 0
+chain_iterations = 0
 limit_chain_iterations = false
 limit_chain_iterations = false
+reset_iterations_on_update = false
 use_middle_joint_target = true
 use_middle_joint_target = true
 
 
 [node name="target" type="Spatial" parent="KinematicBody/CameraHolder/Lean_Path/PathFollow/IK_LookAt_Chest/Aim_pos/IK_FABRIK"]
 [node name="target" type="Spatial" parent="KinematicBody/CameraHolder/Lean_Path/PathFollow/IK_LookAt_Chest/Aim_pos/IK_FABRIK"]
@@ -529,8 +541,17 @@ __meta__ = {
 }
 }
 skeleton_path = NodePath("../../../../../../../../BattleBot/Armature/Skeleton")
 skeleton_path = NodePath("../../../../../../../../BattleBot/Armature/Skeleton")
 bone_name = "Left_Hand"
 bone_name = "Left_Hand"
+update_mode = 0
+look_at_axis = 1
+use_our_rotation_x = false
+use_our_rotation_y = false
+use_our_rotation_z = false
 use_negative_our_rot = true
 use_negative_our_rot = true
 additional_rotation = Vector3( 0, 0, 90 )
 additional_rotation = Vector3( 0, 0, 90 )
+position_using_additional_bone = false
+additional_bone_name = ""
+additional_bone_length = 1.0
+debug_messages = false
 
 
 [node name="middle_joint_target" type="Spatial" parent="KinematicBody/CameraHolder/Lean_Path/PathFollow/IK_LookAt_Chest/Aim_pos/IK_FABRIK"]
 [node name="middle_joint_target" type="Spatial" parent="KinematicBody/CameraHolder/Lean_Path/PathFollow/IK_LookAt_Chest/Aim_pos/IK_FABRIK"]
 transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 5.85263, -2.91316, -2.77555 )
 transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 5.85263, -2.91316, -2.77555 )
@@ -552,7 +573,10 @@ __meta__ = {
 skeleton_path = NodePath("../../../../../../BattleBot/Armature/Skeleton")
 skeleton_path = NodePath("../../../../../../BattleBot/Armature/Skeleton")
 bones_in_chain = PoolStringArray( "Right_UpperArm", "Right_LowerArm", "Right_Hand" )
 bones_in_chain = PoolStringArray( "Right_UpperArm", "Right_LowerArm", "Right_Hand" )
 bones_in_chain_lengths = PoolRealArray( 1.97, 3, 0.1 )
 bones_in_chain_lengths = PoolRealArray( 1.97, 3, 0.1 )
+update_mode = 0
+chain_iterations = 0
 limit_chain_iterations = false
 limit_chain_iterations = false
+reset_iterations_on_update = false
 use_middle_joint_target = true
 use_middle_joint_target = true
 
 
 [node name="target" type="Spatial" parent="KinematicBody/CameraHolder/Lean_Path/PathFollow/IK_LookAt_Chest/Aim_pos/IK_FABRIK_RightArm"]
 [node name="target" type="Spatial" parent="KinematicBody/CameraHolder/Lean_Path/PathFollow/IK_LookAt_Chest/Aim_pos/IK_FABRIK_RightArm"]
@@ -566,8 +590,17 @@ __meta__ = {
 }
 }
 skeleton_path = NodePath("../../../../../../../../BattleBot/Armature/Skeleton")
 skeleton_path = NodePath("../../../../../../../../BattleBot/Armature/Skeleton")
 bone_name = "Right_Hand"
 bone_name = "Right_Hand"
+update_mode = 0
+look_at_axis = 1
+use_our_rotation_x = false
+use_our_rotation_y = false
+use_our_rotation_z = false
 use_negative_our_rot = true
 use_negative_our_rot = true
 additional_rotation = Vector3( 0, 0, 90 )
 additional_rotation = Vector3( 0, 0, 90 )
+position_using_additional_bone = false
+additional_bone_name = ""
+additional_bone_length = 1.0
+debug_messages = false
 
 
 [node name="middle_joint_target" type="Spatial" parent="KinematicBody/CameraHolder/Lean_Path/PathFollow/IK_LookAt_Chest/Aim_pos/IK_FABRIK_RightArm"]
 [node name="middle_joint_target" type="Spatial" parent="KinematicBody/CameraHolder/Lean_Path/PathFollow/IK_LookAt_Chest/Aim_pos/IK_FABRIK_RightArm"]
 transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -5.73318, -2.91316, -2.77555 )
 transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -5.73318, -2.91316, -2.77555 )
@@ -591,6 +624,17 @@ __meta__ = {
 }
 }
 skeleton_path = NodePath("../../../../BattleBot/Armature/Skeleton")
 skeleton_path = NodePath("../../../../BattleBot/Armature/Skeleton")
 bone_name = "Head"
 bone_name = "Head"
+update_mode = 0
+look_at_axis = 1
+use_our_rotation_x = false
+use_our_rotation_y = false
+use_our_rotation_z = false
+use_negative_our_rot = false
+additional_rotation = Vector3( 0, 0, 0 )
+position_using_additional_bone = false
+additional_bone_name = ""
+additional_bone_length = 1.0
+debug_messages = false
 
 
 [node name="AnimationPlayer" type="AnimationPlayer" parent="KinematicBody/CameraHolder"]
 [node name="AnimationPlayer" type="AnimationPlayer" parent="KinematicBody/CameraHolder"]
 autoplay = "Start"
 autoplay = "Start"

+ 31 - 0
3d/ik/look_at_ik.tscn

@@ -75,7 +75,17 @@ __meta__ = {
 }
 }
 skeleton_path = NodePath("../../../BattleBot/Armature/Skeleton")
 skeleton_path = NodePath("../../../BattleBot/Armature/Skeleton")
 bone_name = "Head"
 bone_name = "Head"
+update_mode = 0
+look_at_axis = 1
+use_our_rotation_x = false
+use_our_rotation_y = false
+use_our_rotation_z = false
+use_negative_our_rot = false
 additional_rotation = Vector3( 90, 0, 0 )
 additional_rotation = Vector3( 90, 0, 0 )
+position_using_additional_bone = false
+additional_bone_name = ""
+additional_bone_length = 1.0
+debug_messages = false
 
 
 [node name="IK_LookAt_LeftArm" type="Spatial" parent="Camera/targets"]
 [node name="IK_LookAt_LeftArm" type="Spatial" parent="Camera/targets"]
 script = ExtResource( 6 )
 script = ExtResource( 6 )
@@ -84,6 +94,17 @@ __meta__ = {
 }
 }
 skeleton_path = NodePath("../../../BattleBot/Armature/Skeleton")
 skeleton_path = NodePath("../../../BattleBot/Armature/Skeleton")
 bone_name = "Left_UpperArm"
 bone_name = "Left_UpperArm"
+update_mode = 0
+look_at_axis = 1
+use_our_rotation_x = false
+use_our_rotation_y = false
+use_our_rotation_z = false
+use_negative_our_rot = false
+additional_rotation = Vector3( 0, 0, 0 )
+position_using_additional_bone = false
+additional_bone_name = ""
+additional_bone_length = 1.0
+debug_messages = false
 
 
 [node name="IK_LookAt_RightArm" type="Spatial" parent="Camera/targets"]
 [node name="IK_LookAt_RightArm" type="Spatial" parent="Camera/targets"]
 script = ExtResource( 6 )
 script = ExtResource( 6 )
@@ -92,7 +113,17 @@ __meta__ = {
 }
 }
 skeleton_path = NodePath("../../../BattleBot/Armature/Skeleton")
 skeleton_path = NodePath("../../../BattleBot/Armature/Skeleton")
 bone_name = "Right_UpperArm"
 bone_name = "Right_UpperArm"
+update_mode = 0
+look_at_axis = 1
+use_our_rotation_x = false
+use_our_rotation_y = false
+use_our_rotation_z = false
+use_negative_our_rot = false
 additional_rotation = Vector3( 0, 0, 180 )
 additional_rotation = Vector3( 0, 0, 180 )
+position_using_additional_bone = false
+additional_bone_name = ""
+additional_bone_length = 1.0
+debug_messages = false
 
 
 [node name="Control" type="Control" parent="."]
 [node name="Control" type="Control" parent="."]
 anchor_right = 1.0
 anchor_right = 1.0

+ 10 - 0
3d/ik/skeleton_ik.tscn

@@ -102,7 +102,17 @@ __meta__ = {
 }
 }
 skeleton_path = NodePath("../../../../Skeleton_IK/BattleBot/Armature/Skeleton")
 skeleton_path = NodePath("../../../../Skeleton_IK/BattleBot/Armature/Skeleton")
 bone_name = "Head"
 bone_name = "Head"
+update_mode = 0
+look_at_axis = 1
+use_our_rotation_x = false
+use_our_rotation_y = false
+use_our_rotation_z = false
+use_negative_our_rot = false
 additional_rotation = Vector3( 90, 0, 0 )
 additional_rotation = Vector3( 90, 0, 0 )
+position_using_additional_bone = false
+additional_bone_name = ""
+additional_bone_length = 1.0
+debug_messages = false
 
 
 [node name="MeshInstance" type="MeshInstance" parent="Camera/targets"]
 [node name="MeshInstance" type="MeshInstance" parent="Camera/targets"]
 mesh = SubResource( 5 )
 mesh = SubResource( 5 )