test_collision_pairs.tscn 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. [gd_scene load_steps=10 format=3 uid="uid://wy4qr8euxk27"]
  2. [ext_resource type="Shape3D" path="res://assets/robot_head/godot3_robot_head_collision.tres" id="1"]
  3. [ext_resource type="Script" uid="uid://bo8r6pye3q4ki" path="res://tests/functional/test_collision_pairs.gd" id="2"]
  4. [ext_resource type="Script" uid="uid://cx8vo58lobtgu" path="res://utils/camera_orbit.gd" id="4"]
  5. [ext_resource type="PackedScene" uid="uid://b1ihqm3x8jru" path="res://tests/test_options.tscn" id="5"]
  6. [sub_resource type="BoxShape3D" id="1"]
  7. [sub_resource type="SphereShape3D" id="2"]
  8. [sub_resource type="CapsuleShape3D" id="3"]
  9. [sub_resource type="CylinderShape3D" id="4"]
  10. [sub_resource type="ConvexPolygonShape3D" id="5"]
  11. points = PackedVector3Array(-0.7, 0, -0.7, -0.3, 0, 0.8, 0.8, 0, -0.3, 0, -1, 0)
  12. [node name="Test" type="Node3D"]
  13. script = ExtResource("2")
  14. [node name="Options" parent="." instance=ExtResource("5")]
  15. [node name="Controls" type="VBoxContainer" parent="."]
  16. anchors_preset = 15
  17. anchor_right = 1.0
  18. anchor_bottom = 1.0
  19. offset_left = 25.0
  20. offset_top = 417.0
  21. offset_right = -806.0
  22. offset_bottom = -141.0
  23. theme_override_constants/separation = 10
  24. [node name="OffsetX" type="HBoxContainer" parent="Controls"]
  25. layout_mode = 2
  26. theme_override_constants/separation = 20
  27. alignment = 2
  28. [node name="Label" type="Label" parent="Controls/OffsetX"]
  29. layout_mode = 2
  30. text = "Offset X"
  31. [node name="HSlider" type="HSlider" parent="Controls/OffsetX"]
  32. custom_minimum_size = Vector2(230, 2.08165e-12)
  33. layout_mode = 2
  34. min_value = -1.0
  35. max_value = 1.0
  36. step = 0.01
  37. [node name="OffsetY" type="HBoxContainer" parent="Controls"]
  38. layout_mode = 2
  39. theme_override_constants/separation = 20
  40. alignment = 2
  41. [node name="Label" type="Label" parent="Controls/OffsetY"]
  42. layout_mode = 2
  43. text = "Offset Y"
  44. [node name="HSlider" type="HSlider" parent="Controls/OffsetY"]
  45. custom_minimum_size = Vector2(230, 2.08165e-12)
  46. layout_mode = 2
  47. min_value = -1.0
  48. max_value = 1.0
  49. step = 0.01
  50. [node name="OffsetZ" type="HBoxContainer" parent="Controls"]
  51. layout_mode = 2
  52. theme_override_constants/separation = 20
  53. alignment = 2
  54. [node name="Label" type="Label" parent="Controls/OffsetZ"]
  55. layout_mode = 2
  56. text = "Offset Z"
  57. [node name="HSlider" type="HSlider" parent="Controls/OffsetZ"]
  58. custom_minimum_size = Vector2(230, 2.08165e-12)
  59. layout_mode = 2
  60. min_value = -1.0
  61. max_value = 1.0
  62. step = 0.01
  63. [node name="Shapes" type="Node3D" parent="."]
  64. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 9.35591, 0)
  65. [node name="RigidBodyBox" type="RigidBody3D" parent="Shapes"]
  66. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0, 0)
  67. freeze = true
  68. [node name="CollisionShape" type="CollisionShape3D" parent="Shapes/RigidBodyBox"]
  69. transform = Transform3D(0.579556, 0.0885213, 0.145926, 0, 0.939693, -0.205212, -0.155291, 0.330366, 0.544604, 0, 0, 0)
  70. shape = SubResource("1")
  71. debug_color = Color(1, 1, 0, 1)
  72. [node name="RigidBodySphere" type="RigidBody3D" parent="Shapes"]
  73. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3, 0, 0)
  74. freeze = true
  75. [node name="CollisionShape" type="CollisionShape3D" parent="Shapes/RigidBodySphere"]
  76. transform = Transform3D(1.2, 0, 0, 0, 1.2, 0, 0, 0, 1.2, 0, 0, 0)
  77. shape = SubResource("2")
  78. debug_color = Color(1, 1, 0, 1)
  79. [node name="RigidBodyCapsule" type="RigidBody3D" parent="Shapes"]
  80. freeze = true
  81. [node name="CollisionShape" type="CollisionShape3D" parent="Shapes/RigidBodyCapsule"]
  82. transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0, 0)
  83. shape = SubResource("3")
  84. debug_color = Color(1, 1, 0, 1)
  85. [node name="RigidBodyCylinder" type="RigidBody3D" parent="Shapes"]
  86. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 0, 0)
  87. freeze = true
  88. [node name="CollisionShape" type="CollisionShape3D" parent="Shapes/RigidBodyCylinder"]
  89. transform = Transform3D(0.772741, -0.258819, 2.59821e-08, 0.2, 0.933013, -0.207055, 0.0535898, 0.25, 0.772741, 0, 0, 0)
  90. shape = SubResource("4")
  91. debug_color = Color(1, 1, 0, 1)
  92. [node name="RigidBodyConvexPolygon" type="RigidBody3D" parent="Shapes"]
  93. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, -0.211, 0)
  94. freeze = true
  95. [node name="CollisionShape" type="CollisionShape3D" parent="Shapes/RigidBodyConvexPolygon"]
  96. transform = Transform3D(2, 0, 0, 0, 2.95442, 0.347296, 0, -0.520945, 1.96962, 0, 0.35, 0)
  97. shape = SubResource("5")
  98. debug_color = Color(1, 1, 0, 1)
  99. [node name="RigidBodyConcavePolygon" type="StaticBody3D" parent="Shapes"]
  100. transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0, -6, 3.934)
  101. [node name="CollisionShape" type="CollisionShape3D" parent="Shapes/RigidBodyConcavePolygon"]
  102. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
  103. shape = ExtResource("1")
  104. debug_color = Color(0, 0.533333, 1, 1)
  105. [node name="Camera3D" type="Camera3D" parent="."]
  106. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 8.38087, 11.8164)
  107. script = ExtResource("4")
  108. [connection signal="value_changed" from="Controls/OffsetX/HSlider" to="." method="set_x_offset"]
  109. [connection signal="value_changed" from="Controls/OffsetY/HSlider" to="." method="set_y_offset"]
  110. [connection signal="value_changed" from="Controls/OffsetZ/HSlider" to="." method="set_z_offset"]