look_at_ik.tscn 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. [gd_scene load_steps=10 format=3 uid="uid://dyhjvb7q0b3j"]
  2. [ext_resource type="Texture2D" uid="uid://bw3q8aq6gfuof" path="res://addons/sade/editor_gizmo_texture.png" id="1"]
  3. [ext_resource type="PackedScene" uid="uid://ctssefekxjogg" path="res://model/godot_battle_bot.dae" id="2"]
  4. [ext_resource type="Material" path="res://model/battle_bot_color.tres" id="3"]
  5. [ext_resource type="Script" path="res://target_from_mousepos.gd" id="5"]
  6. [ext_resource type="Script" path="res://addons/sade/ik_look_at.gd" id="6"]
  7. [ext_resource type="Texture2D" uid="uid://dhgpf3w8mh4ed" path="res://addons/sade/ik_look_at.png" id="7"]
  8. [ext_resource type="Script" path="res://button_change_scene.gd" id="8"]
  9. [sub_resource type="PlaneMesh" id="1"]
  10. size = Vector2(40, 40)
  11. [sub_resource type="StandardMaterial3D" id="2"]
  12. albedo_texture = ExtResource( "1" )
  13. roughness = 0.2
  14. uv1_scale = Vector3(0.25, 0.25, 0.25)
  15. uv1_triplanar = true
  16. texture_filter = 0
  17. [node name="LookAtIK" type="Node3D"]
  18. [node name="Floor" type="MeshInstance3D" parent="."]
  19. mesh = SubResource( "1" )
  20. surface_material_override/0 = SubResource( "2" )
  21. [node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
  22. transform = Transform3D(0.56827, 0.673454, -0.472789, 0, 0.574581, 0.818448, 0.822842, -0.465099, 0.326517, -9.77531, 11.5204, 11.766)
  23. [node name="GodotBattleBot" parent="." instance=ExtResource( "2" )]
  24. [node name="godot_battle_bot" parent="GodotBattleBot/Armature/Skeleton3D" index="0"]
  25. surface_material_override/0 = ExtResource( "3" )
  26. [node name="Camera3D" type="Camera3D" parent="."]
  27. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 11.501, 11)
  28. fov = 74.0
  29. script = ExtResource( "5" )
  30. MOVEMENT_SPEED = -3.0
  31. flip_axis = true
  32. [node name="Targets" type="Node3D" parent="Camera3D"]
  33. [node name="IK_LookAt_Head" type="Node3D" parent="Camera3D/Targets"]
  34. script = ExtResource( "6" )
  35. __meta__ = {
  36. "_editor_icon": ExtResource( "7" )
  37. }
  38. skeleton_path = NodePath("../../../GodotBattleBot/Armature/Skeleton3D")
  39. bone_name = "Head"
  40. additional_rotation = Vector3(90, 0, 0)
  41. [node name="IK_LookAt_LeftArm" type="Node3D" parent="Camera3D/Targets"]
  42. script = ExtResource( "6" )
  43. __meta__ = {
  44. "_editor_icon": ExtResource( "7" )
  45. }
  46. skeleton_path = NodePath("../../../GodotBattleBot/Armature/Skeleton3D")
  47. bone_name = "Left_UpperArm"
  48. [node name="IK_LookAt_RightArm" type="Node3D" parent="Camera3D/Targets"]
  49. script = ExtResource( "6" )
  50. __meta__ = {
  51. "_editor_icon": ExtResource( "7" )
  52. }
  53. skeleton_path = NodePath("../../../GodotBattleBot/Armature/Skeleton3D")
  54. bone_name = "Right_UpperArm"
  55. additional_rotation = Vector3(0, 0, 180)
  56. [node name="Control" type="Control" parent="."]
  57. anchor_right = 1.0
  58. anchor_bottom = 1.0
  59. __meta__ = {
  60. "_edit_use_anchors_": false
  61. }
  62. [node name="Panel" type="Panel" parent="Control"]
  63. modulate = Color(1, 1, 1, 0.784314)
  64. anchor_top = 1.0
  65. anchor_right = 1.0
  66. anchor_bottom = 1.0
  67. offset_left = -2.0
  68. offset_top = -70.0
  69. offset_right = 4.0
  70. __meta__ = {
  71. "_edit_use_anchors_": false
  72. }
  73. [node name="Label" type="Label" parent="Control/Panel"]
  74. anchor_right = 1.0
  75. anchor_bottom = 1.0
  76. offset_left = 12.0
  77. offset_top = 10.0
  78. offset_right = -18.0
  79. offset_bottom = -29.0
  80. text = "LookAt IK
  81. Move mouse to move IK targets"
  82. __meta__ = {
  83. "_edit_use_anchors_": false
  84. }
  85. [node name="ButtonNext" type="Button" parent="Control"]
  86. anchor_left = 1.0
  87. anchor_top = 1.0
  88. anchor_right = 1.0
  89. anchor_bottom = 1.0
  90. offset_left = -124.0
  91. offset_top = -60.0
  92. offset_right = -5.0
  93. offset_bottom = -10.0
  94. text = "Next scene"
  95. script = ExtResource( "8" )
  96. __meta__ = {
  97. "_edit_use_anchors_": false
  98. }
  99. scene_to_change_to = "res://fabrik_ik.tscn"
  100. [editable path="GodotBattleBot"]