look_at_ik.tscn 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. [gd_scene load_steps=11 format=2]
  2. [ext_resource path="res://addons/sade/editor_gizmo_texture.png" type="Texture" id=1]
  3. [ext_resource path="res://model/godot_battle_bot.dae" type="PackedScene" id=2]
  4. [ext_resource path="res://model/battle_bot_color.tres" type="Material" id=3]
  5. [ext_resource path="res://model/battle_bot_emission.tres" type="Material" id=4]
  6. [ext_resource path="res://target_from_mousepos.gd" type="Script" id=5]
  7. [ext_resource path="res://addons/sade/ik_look_at.gd" type="Script" id=6]
  8. [ext_resource path="res://addons/sade/ik_look_at.png" type="Texture" id=7]
  9. [ext_resource path="res://button_change_scene.gd" type="Script" id=8]
  10. [sub_resource type="PlaneMesh" id=1]
  11. size = Vector2( 40, 40 )
  12. [sub_resource type="SpatialMaterial" id=2]
  13. albedo_texture = ExtResource( 1 )
  14. roughness = 0.2
  15. uv1_scale = Vector3( 0.25, 0.25, 0.25 )
  16. uv1_triplanar = true
  17. [node name="LookAtIK" type="Spatial"]
  18. [node name="Floor" type="MeshInstance" parent="."]
  19. mesh = SubResource( 1 )
  20. material/0 = SubResource( 2 )
  21. [node name="DirectionalLight" type="DirectionalLight" parent="."]
  22. transform = Transform( 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/Skeleton" index="0"]
  25. material/0 = ExtResource( 3 )
  26. material/1 = ExtResource( 4 )
  27. [node name="Camera" type="Camera" parent="."]
  28. transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 11.501, 11 )
  29. fov = 74.0
  30. script = ExtResource( 5 )
  31. MOVEMENT_SPEED = -3.0
  32. flip_axis = true
  33. [node name="Targets" type="Spatial" parent="Camera"]
  34. [node name="IK_LookAt_Head" type="Spatial" parent="Camera/Targets"]
  35. script = ExtResource( 6 )
  36. __meta__ = {
  37. "_editor_icon": ExtResource( 7 )
  38. }
  39. skeleton_path = NodePath("../../../GodotBattleBot/Armature/Skeleton")
  40. bone_name = "Head"
  41. additional_rotation = Vector3( 90, 0, 0 )
  42. [node name="IK_LookAt_LeftArm" type="Spatial" parent="Camera/Targets"]
  43. script = ExtResource( 6 )
  44. __meta__ = {
  45. "_editor_icon": ExtResource( 7 )
  46. }
  47. skeleton_path = NodePath("../../../GodotBattleBot/Armature/Skeleton")
  48. bone_name = "Left_UpperArm"
  49. [node name="IK_LookAt_RightArm" type="Spatial" parent="Camera/Targets"]
  50. script = ExtResource( 6 )
  51. __meta__ = {
  52. "_editor_icon": ExtResource( 7 )
  53. }
  54. skeleton_path = NodePath("../../../GodotBattleBot/Armature/Skeleton")
  55. bone_name = "Right_UpperArm"
  56. additional_rotation = Vector3( 0, 0, 180 )
  57. [node name="Control" type="Control" parent="."]
  58. anchor_right = 1.0
  59. anchor_bottom = 1.0
  60. __meta__ = {
  61. "_edit_use_anchors_": false
  62. }
  63. [node name="Panel" type="Panel" parent="Control"]
  64. modulate = Color( 1, 1, 1, 0.784314 )
  65. anchor_top = 1.0
  66. anchor_right = 1.0
  67. anchor_bottom = 1.0
  68. margin_left = -2.0
  69. margin_top = -70.0
  70. margin_right = 4.0
  71. __meta__ = {
  72. "_edit_use_anchors_": false
  73. }
  74. [node name="Label" type="Label" parent="Control/Panel"]
  75. anchor_right = 1.0
  76. anchor_bottom = 1.0
  77. margin_left = 12.0
  78. margin_top = 10.0
  79. margin_right = -18.0
  80. margin_bottom = -29.0
  81. text = "LookAt IK
  82. Move mouse to move IK targets"
  83. align = 1
  84. valign = 1
  85. __meta__ = {
  86. "_edit_use_anchors_": false
  87. }
  88. [node name="ButtonNext" type="Button" parent="Control"]
  89. anchor_left = 1.0
  90. anchor_top = 1.0
  91. anchor_right = 1.0
  92. anchor_bottom = 1.0
  93. margin_left = -124.0
  94. margin_top = -60.0
  95. margin_right = -5.0
  96. margin_bottom = -10.0
  97. text = "Next scene"
  98. script = ExtResource( 8 )
  99. __meta__ = {
  100. "_edit_use_anchors_": false
  101. }
  102. scene_to_change_to = "res://fabrik_ik.tscn"
  103. [editable path="GodotBattleBot"]