test_raycasting.tscn 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. [gd_scene load_steps=10 format=3 uid="uid://dnpps474nfbu4"]
  2. [ext_resource type="Shape3D" path="res://assets/robot_head/godot3_robot_head_collision.tres" id="1"]
  3. [ext_resource type="Script" uid="uid://cjd3xvrn5bdw5" path="res://tests/functional/test_raycasting.gd" id="2"]
  4. [ext_resource type="PackedScene" uid="uid://b1ihqm3x8jru" path="res://tests/test_options.tscn" id="2_qprqi"]
  5. [ext_resource type="Script" uid="uid://cx8vo58lobtgu" path="res://utils/camera_orbit.gd" id="4"]
  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("2_qprqi")]
  15. offset_right = 134.0
  16. offset_bottom = 135.719
  17. theme_override_font_sizes/font_size = 16
  18. [node name="Shapes" type="Node3D" parent="."]
  19. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 9.35591, 0)
  20. [node name="RigidBodyBox" type="RigidBody3D" parent="Shapes"]
  21. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0, 0)
  22. freeze = true
  23. [node name="CollisionShape" type="CollisionShape3D" parent="Shapes/RigidBodyBox"]
  24. transform = Transform3D(0.579556, 0.0885213, 0.145926, 0, 0.939693, -0.205212, -0.155291, 0.330366, 0.544604, 0, 0, 0)
  25. shape = SubResource("1")
  26. debug_color = Color(1, 1, 0, 1)
  27. [node name="RigidBodySphere" type="RigidBody3D" parent="Shapes"]
  28. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3, 0, 0)
  29. freeze = true
  30. [node name="CollisionShape" type="CollisionShape3D" parent="Shapes/RigidBodySphere"]
  31. transform = Transform3D(1.2, 0, 0, 0, 1.2, 0, 0, 0, 1.2, 0, 0, 0)
  32. shape = SubResource("2")
  33. debug_color = Color(1, 1, 0, 1)
  34. [node name="RigidBodyCapsule" type="RigidBody3D" parent="Shapes"]
  35. freeze = true
  36. [node name="CollisionShape" type="CollisionShape3D" parent="Shapes/RigidBodyCapsule"]
  37. transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0, 0)
  38. shape = SubResource("3")
  39. debug_color = Color(1, 1, 0, 1)
  40. [node name="RigidBodyCylinder" type="RigidBody3D" parent="Shapes"]
  41. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 0, 0)
  42. freeze = true
  43. [node name="CollisionShape" type="CollisionShape3D" parent="Shapes/RigidBodyCylinder"]
  44. transform = Transform3D(0.772741, -0.258819, 2.59821e-08, 0.2, 0.933013, -0.207055, 0.0535898, 0.25, 0.772741, 0, 0, 0)
  45. shape = SubResource("4")
  46. debug_color = Color(1, 1, 0, 1)
  47. [node name="RigidBodyConvexPolygon" type="RigidBody3D" parent="Shapes"]
  48. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, -0.211, 0)
  49. freeze = true
  50. [node name="CollisionShape" type="CollisionShape3D" parent="Shapes/RigidBodyConvexPolygon"]
  51. transform = Transform3D(2, 0, 0, 0, 2.89766, -0.517939, 0, 0.776908, 1.93177, 0, 0.3533, 0)
  52. shape = SubResource("5")
  53. debug_color = Color(1, 1, 0, 1)
  54. [node name="StaticBodyHead" type="StaticBody3D" parent="Shapes"]
  55. transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0, -6, 3.93357)
  56. [node name="CollisionShape" type="CollisionShape3D" parent="Shapes/StaticBodyHead"]
  57. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
  58. shape = ExtResource("1")
  59. debug_color = Color(0, 0.533333, 1, 1)
  60. [node name="Camera3D" type="Camera3D" parent="."]
  61. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5.8667, 11.8164)
  62. script = ExtResource("4")