test_raycasting.tscn 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. [gd_scene load_steps=7 format=3 uid="uid://dwka2imbe5gcs"]
  2. [ext_resource type="Texture2D" uid="uid://c5duuyhbmd0m4" path="res://assets/texture/godot-head.png" id="1"]
  3. [ext_resource type="Script" path="res://tests/functional/test_raycasting.gd" id="2"]
  4. [ext_resource type="PackedScene" uid="uid://blh3twy74kbkv" path="res://tests/test_options.tscn" id="2_q8u1v"]
  5. [sub_resource type="RectangleShape2D" id="1"]
  6. size = Vector2(80, 120)
  7. [sub_resource type="CircleShape2D" id="2"]
  8. radius = 60.0
  9. [sub_resource type="CapsuleShape2D" id="3"]
  10. radius = 30.0
  11. height = 110.0
  12. [node name="Test" type="Node2D"]
  13. script = ExtResource( "2" )
  14. [node name="Options" parent="." instance=ExtResource( "2_q8u1v" )]
  15. offset_right = 134.0
  16. offset_bottom = 135.719
  17. theme_override_font_sizes/font_size = 16
  18. [node name="Shapes" type="Node2D" parent="."]
  19. z_index = -1
  20. z_as_relative = false
  21. [node name="RigidBodyRectangle" type="RigidDynamicBody2D" parent="Shapes"]
  22. position = Vector2(114.877, 248.76)
  23. freeze = true
  24. [node name="CollisionShape2D" type="CollisionShape2D" parent="Shapes/RigidBodyRectangle"]
  25. rotation = -1.19206
  26. scale = Vector2(1.2, 1.2)
  27. shape = SubResource( "1" )
  28. [node name="RigidBodySphere" type="RigidDynamicBody2D" parent="Shapes"]
  29. position = Vector2(314.894, 257.658)
  30. freeze = true
  31. [node name="CollisionShape2D" type="CollisionShape2D" parent="Shapes/RigidBodySphere"]
  32. shape = SubResource( "2" )
  33. [node name="RigidBodyCapsule" type="RigidDynamicBody2D" parent="Shapes"]
  34. position = Vector2(465.629, 261.204)
  35. freeze = true
  36. [node name="CollisionShape2D" type="CollisionShape2D" parent="Shapes/RigidBodyCapsule"]
  37. rotation = -0.202458
  38. scale = Vector2(1.2, 1.2)
  39. shape = SubResource( "3" )
  40. [node name="RigidBodyConvexPolygon" type="RigidDynamicBody2D" parent="Shapes"]
  41. position = Vector2(613.385, 252.771)
  42. freeze = true
  43. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Shapes/RigidBodyConvexPolygon"]
  44. polygon = PackedVector2Array(10.7, -54.5, 28.3596, -49.4067, 47.6282, -34.3806, 57.9717, -20.9447, 50.9869, 35.2694, 38.8, 47.5, 15.9852, 54.3613, -14.9507, 54.1845, -36.5, 48.1, -50.4828, 36.33, -58.0115, -20.515, -46.9473, -34.7342, -26.0876, -50.1138, -11.4152, -54.5332)
  45. [node name="GodotIcon" type="Sprite2D" parent="Shapes/RigidBodyConvexPolygon"]
  46. modulate = Color(1, 1, 1, 0.392157)
  47. texture = ExtResource( "1" )
  48. [node name="RigidBodyConcavePolygon" type="RigidDynamicBody2D" parent="Shapes"]
  49. position = Vector2(771.159, 252.771)
  50. freeze = true
  51. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Shapes/RigidBodyConcavePolygon"]
  52. polygon = PackedVector2Array(-5.93512, -43.2195, 6.44476, -42.9695, 11.127, -54.3941, 26.9528, -49.4309, 26.2037, -36.508, 37.5346, -28.1737, 47.6282, -34.3806, 58.0427, -20.9631, 51.113, -10.2876, 50.9869, 35.2694, 38.8, 47.5, 15.9852, 54.3613, -14.9507, 54.1845, -36.5, 48.1, -50.4828, 36.33, -51.3668, -9.98545, -57.8889, -20.5885, -46.9473, -34.7342, -37.4014, -28.547, -26.0876, -37.0323, -26.9862, -49.15, -11.4152, -54.5332)
  53. [node name="GodotIcon" type="Sprite2D" parent="Shapes/RigidBodyConcavePolygon"]
  54. modulate = Color(1, 1, 1, 0.392157)
  55. texture = ExtResource( "1" )
  56. [node name="RigidBodyConcaveSegments" type="RigidDynamicBody2D" parent="Shapes"]
  57. position = Vector2(930.097, 252.771)
  58. freeze = true
  59. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Shapes/RigidBodyConcaveSegments"]
  60. build_mode = 1
  61. polygon = PackedVector2Array(-5.93512, -43.2195, 6.44476, -42.9695, 11.127, -54.3941, 26.9528, -49.4309, 26.2037, -36.508, 37.5346, -28.1737, 47.6282, -34.3806, 58.0427, -20.9631, 51.113, -10.2876, 50.9869, 35.2694, 38.8, 47.5, 15.9852, 54.3613, -14.9507, 54.1845, -36.5, 48.1, -50.4828, 36.33, -51.3668, -9.98545, -57.8889, -20.5885, -46.9473, -34.7342, -37.4014, -28.547, -26.0876, -37.0323, -26.9862, -49.15, -11.4152, -54.5332)
  62. [node name="GodotIcon" type="Sprite2D" parent="Shapes/RigidBodyConcaveSegments"]
  63. modulate = Color(1, 1, 1, 0.392157)
  64. texture = ExtResource( "1" )