Przeglądaj źródła

[IK] Update to Godot 3.1

Open and save all resources
Aaron Franke 6 lat temu
rodzic
commit
990042e3c5

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

@@ -201,4 +201,4 @@ func _physics_process(delta):
 	update_skeleton()
 	update_skeleton()
 func _notification(what):
 func _notification(what):
 	if what == NOTIFICATION_TRANSFORM_CHANGED:
 	if what == NOTIFICATION_TRANSFORM_CHANGED:
-		update_skeleton()
+		update_skeleton()

+ 0 - 1
3d/ik/default_env.tres

@@ -12,4 +12,3 @@ sun_energy = 16.0
 [resource]
 [resource]
 background_mode = 2
 background_mode = 2
 background_sky = SubResource( 1 )
 background_sky = SubResource( 1 )
-

+ 5 - 10
3d/ik/fabrik_ik.tscn

@@ -95,10 +95,8 @@ __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"]
@@ -119,10 +117,10 @@ additional_rotation = Vector3( 0, 0, 90 )
 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 )
 
 
 [node name="Left_UpperArm" type="Spatial" parent="Camera/targets/IK_FABRIK_Left_Arm"]
 [node name="Left_UpperArm" type="Spatial" parent="Camera/targets/IK_FABRIK_Left_Arm"]
-transform = Transform( -0.66477, 0.0771345, -0.743055, -2.23517e-008, 0.994655, 0.103252, 0.747048, 0.0686391, -0.661217, 1.53444, 0.300478, -3.63533 )
+transform = Transform( -0.66477, 0.0771345, -0.743055, -2.23517e-08, 0.994655, 0.103252, 0.747048, 0.0686391, -0.661217, 1.53444, 0.300478, -3.63533 )
 
 
 [node name="Left_LowerArm" type="Spatial" parent="Camera/targets/IK_FABRIK_Left_Arm"]
 [node name="Left_LowerArm" type="Spatial" parent="Camera/targets/IK_FABRIK_Left_Arm"]
-transform = Transform( -0.773624, -0.0228999, 0.633231, 2.98023e-008, 0.999347, 0.03614, -0.633645, 0.0279588, -0.773119, 2.94998, 0.10378, -2.37569 )
+transform = Transform( -0.773624, -0.0228999, 0.633231, 2.98023e-08, 0.999347, 0.03614, -0.633645, 0.0279588, -0.773119, 2.94998, 0.10378, -2.37569 )
 
 
 [node name="IK_FABRIK_Right_Arm" type="Spatial" parent="Camera/targets"]
 [node name="IK_FABRIK_Right_Arm" type="Spatial" parent="Camera/targets"]
 editor/display_folded = true
 editor/display_folded = true
@@ -133,10 +131,8 @@ __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 = 2
 chain_iterations = 2
 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"]
@@ -157,13 +153,13 @@ additional_rotation = Vector3( 0, 0, 90 )
 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 )
 
 
 [node name="Right_UpperArm" type="Spatial" parent="Camera/targets/IK_FABRIK_Right_Arm"]
 [node name="Right_UpperArm" type="Spatial" parent="Camera/targets/IK_FABRIK_Right_Arm"]
-transform = Transform( -0.694982, -0.0753926, 0.715064, -7.45058e-009, 0.994488, 0.104854, -0.719028, 0.0728714, -0.691151, -1.53339, 0.300478, -3.63533 )
+transform = Transform( -0.694982, -0.0753926, 0.715064, -7.45058e-09, 0.994488, 0.104854, -0.719028, 0.0728714, -0.691151, -1.53339, 0.300478, -3.63533 )
 
 
 [node name="Right_LowerArm" type="Spatial" parent="Camera/targets/IK_FABRIK_Right_Arm"]
 [node name="Right_LowerArm" type="Spatial" parent="Camera/targets/IK_FABRIK_Right_Arm"]
-transform = Transform( -0.792023, 0.0165711, -0.610266, -1.49012e-008, 0.999631, 0.0271438, 0.610491, 0.0214986, -0.791732, -2.89561, 0.100755, -2.31866 )
+transform = Transform( -0.792023, 0.0165711, -0.610266, -1.49012e-08, 0.999631, 0.0271438, 0.610491, 0.0214986, -0.791732, -2.89561, 0.100755, -2.31866 )
 
 
 [node name="Right_Hand" type="Spatial" parent="Camera/targets/IK_FABRIK_Right_Arm"]
 [node name="Right_Hand" type="Spatial" parent="Camera/targets/IK_FABRIK_Right_Arm"]
-transform = Transform( -0.678336, 0.00698721, -0.734719, -2.32831e-009, 0.999955, 0.00950961, 0.734752, 0.00645071, -0.678305, -1.07914, 0.020072, 0.03791 )
+transform = Transform( -0.678336, 0.00698721, -0.734719, -2.32831e-09, 0.999955, 0.00950961, 0.734752, 0.00645071, -0.678305, -1.07914, 0.020072, 0.03791 )
 
 
 [node name="MeshInstance" type="MeshInstance" parent="Camera/targets"]
 [node name="MeshInstance" type="MeshInstance" parent="Camera/targets"]
 mesh = SubResource( 5 )
 mesh = SubResource( 5 )
@@ -236,5 +232,4 @@ text = "Previous scene"
 script = ExtResource( 10 )
 script = ExtResource( 10 )
 scene_to_change_to = "res://look_at_ik.tscn"
 scene_to_change_to = "res://look_at_ik.tscn"
 
 
-
 [editable path="BattleBot"]
 [editable path="BattleBot"]

+ 2 - 7
3d/ik/fps_example.tscn

@@ -500,7 +500,7 @@ rect_rotation = 90.0
 script = ExtResource( 3 )
 script = ExtResource( 3 )
 
 
 [node name="CollisionShape" type="CollisionShape" parent="KinematicBody"]
 [node name="CollisionShape" type="CollisionShape" parent="KinematicBody"]
-transform = Transform( 1, 0, 0, 0, -4.37114e-008, -1, 0, 1, -4.37114e-008, 0, 7, 0 )
+transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 7, 0 )
 shape = SubResource( 10 )
 shape = SubResource( 10 )
 
 
 [node name="CameraHolder" type="Spatial" parent="KinematicBody"]
 [node name="CameraHolder" type="Spatial" parent="KinematicBody"]
@@ -529,7 +529,7 @@ look_at_axis = 2
 additional_rotation = Vector3( -10, 0, 0 )
 additional_rotation = Vector3( -10, 0, 0 )
 
 
 [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-008, 0, 1, 0, 8.74228e-008, 0, -1, 0, 0, 0 )
+transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0 )
 fov = 74.0
 fov = 74.0
 
 
 [node name="Aim_pos" type="Spatial" parent="KinematicBody/CameraHolder/Lean_Path/PathFollow/IK_LookAt_Chest"]
 [node name="Aim_pos" type="Spatial" parent="KinematicBody/CameraHolder/Lean_Path/PathFollow/IK_LookAt_Chest"]
@@ -544,10 +544,8 @@ __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 = 6
 chain_iterations = 6
 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"]
@@ -584,10 +582,8 @@ __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 = 3
 chain_iterations = 3
 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"]
@@ -654,7 +650,6 @@ editor/display_folded = true
 material/0 = ExtResource( 12 )
 material/0 = ExtResource( 12 )
 material/1 = ExtResource( 13 )
 material/1 = ExtResource( 13 )
 
 
-
 [editable path="KinematicBody/CameraHolder/Weapon/Pistol"]
 [editable path="KinematicBody/CameraHolder/Weapon/Pistol"]
 
 
 [editable path="KinematicBody/BattleBot"]
 [editable path="KinematicBody/BattleBot"]

+ 0 - 49
3d/ik/gun_color.tres

@@ -3,54 +3,5 @@
 [ext_resource path="res://gun_textures.png" type="Texture" id=1]
 [ext_resource path="res://gun_textures.png" type="Texture" id=1]
 
 
 [resource]
 [resource]
-
-render_priority = 0
-flags_transparent = false
-flags_unshaded = false
-flags_vertex_lighting = false
-flags_no_depth_test = false
-flags_use_point_size = false
-flags_world_triplanar = false
-flags_fixed_size = false
-flags_albedo_tex_force_srgb = false
-vertex_color_use_as_albedo = false
-vertex_color_is_srgb = false
-params_diffuse_mode = 0
-params_specular_mode = 0
-params_blend_mode = 0
-params_cull_mode = 0
-params_depth_draw_mode = 0
-params_line_width = 1.0
-params_point_size = 1.0
-params_billboard_mode = 0
-params_grow = false
-params_use_alpha_scissor = false
-albedo_color = Color( 1, 1, 1, 1 )
 albedo_texture = ExtResource( 1 )
 albedo_texture = ExtResource( 1 )
-metallic = 0.0
-metallic_specular = 0.5
-metallic_texture_channel = 0
 roughness = 0.0
 roughness = 0.0
-roughness_texture_channel = 0
-emission_enabled = false
-normal_enabled = false
-rim_enabled = false
-clearcoat_enabled = false
-anisotropy_enabled = false
-ao_enabled = false
-depth_enabled = false
-subsurf_scatter_enabled = false
-transmission_enabled = false
-refraction_enabled = false
-detail_enabled = false
-uv1_scale = Vector3( 1, 1, 1 )
-uv1_offset = Vector3( 0, 0, 0 )
-uv1_triplanar = false
-uv1_triplanar_sharpness = 1.0
-uv2_scale = Vector3( 1, 1, 1 )
-uv2_offset = Vector3( 0, 0, 0 )
-uv2_triplanar = false
-uv2_triplanar_sharpness = 1.0
-proximity_fade_enable = false
-distance_fade_enable = false
-

+ 0 - 48
3d/ik/gun_emission.tres

@@ -1,57 +1,9 @@
 [gd_resource type="SpatialMaterial" format=2]
 [gd_resource type="SpatialMaterial" format=2]
 
 
 [resource]
 [resource]
-
-render_priority = 0
-flags_transparent = false
-flags_unshaded = false
-flags_vertex_lighting = false
-flags_no_depth_test = false
-flags_use_point_size = false
-flags_world_triplanar = false
-flags_fixed_size = false
-flags_albedo_tex_force_srgb = false
-vertex_color_use_as_albedo = false
-vertex_color_is_srgb = false
-params_diffuse_mode = 0
-params_specular_mode = 0
-params_blend_mode = 0
-params_cull_mode = 0
-params_depth_draw_mode = 0
-params_line_width = 1.0
-params_point_size = 1.0
-params_billboard_mode = 0
-params_grow = false
-params_use_alpha_scissor = false
-albedo_color = Color( 1, 1, 1, 1 )
-metallic = 0.0
-metallic_specular = 0.5
-metallic_texture_channel = 0
 roughness = 0.0
 roughness = 0.0
-roughness_texture_channel = 0
 emission_enabled = true
 emission_enabled = true
 emission = Color( 1, 0, 0, 1 )
 emission = Color( 1, 0, 0, 1 )
 emission_energy = 1.0
 emission_energy = 1.0
 emission_operator = 0
 emission_operator = 0
 emission_on_uv2 = false
 emission_on_uv2 = false
-normal_enabled = false
-rim_enabled = false
-clearcoat_enabled = false
-anisotropy_enabled = false
-ao_enabled = false
-depth_enabled = false
-subsurf_scatter_enabled = false
-transmission_enabled = false
-refraction_enabled = false
-detail_enabled = false
-uv1_scale = Vector3( 1, 1, 1 )
-uv1_offset = Vector3( 0, 0, 0 )
-uv1_triplanar = false
-uv1_triplanar_sharpness = 1.0
-uv2_scale = Vector3( 1, 1, 1 )
-uv2_offset = Vector3( 0, 0, 0 )
-uv2_triplanar = false
-uv2_triplanar_sharpness = 1.0
-proximity_fade_enable = false
-distance_fade_enable = false
-

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

@@ -123,5 +123,4 @@ text = "Next scene"
 script = ExtResource( 8 )
 script = ExtResource( 8 )
 scene_to_change_to = "res://fabrik_ik.tscn"
 scene_to_change_to = "res://fabrik_ik.tscn"
 
 
-
 [editable path="BattleBot"]
 [editable path="BattleBot"]

+ 0 - 1
3d/ik/simple_bullet.tscn

@@ -35,4 +35,3 @@ material/0 = SubResource( 3 )
 
 
 [node name="CollisionShape" type="CollisionShape" parent="."]
 [node name="CollisionShape" type="CollisionShape" parent="."]
 shape = SubResource( 4 )
 shape = SubResource( 4 )
-

+ 2 - 1
3d/ik/target_from_mousepos.gd

@@ -17,4 +17,5 @@ func _process(delta):
 	else:
 	else:
 		mouse_to_world = -mouse_to_world
 		mouse_to_world = -mouse_to_world
 	
 	
-	targets.transform.origin = mouse_to_world
+	targets.transform.origin = mouse_to_world
+