test_raycasting.tscn 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. [gd_scene load_steps=7 format=2]
  2. [ext_resource path="res://assets/texture/godot-head.png" type="Texture" id=1]
  3. [ext_resource path="res://tests/functional/test_raycasting.gd" type="Script" id=2]
  4. [sub_resource type="RectangleShape2D" id=1]
  5. extents = Vector2( 40, 60 )
  6. [sub_resource type="CircleShape2D" id=2]
  7. radius = 60.0
  8. [sub_resource type="CapsuleShape2D" id=3]
  9. radius = 30.0
  10. height = 50.0
  11. [sub_resource type="ConcavePolygonShape2D" id=4]
  12. segments = PoolVector2Array( -5.93512, -43.2195, 6.44476, -42.9695, 6.44476, -42.9695, 11.127, -54.3941, 11.127, -54.3941, 26.9528, -49.4309, 26.9528, -49.4309, 26.2037, -36.508, 26.2037, -36.508, 37.5346, -28.1737, 37.5346, -28.1737, 47.6282, -34.3806, 47.6282, -34.3806, 58.0427, -20.9631, 58.0427, -20.9631, 51.113, -10.2876, 51.113, -10.2876, 50.9869, 35.2694, 50.9869, 35.2694, 38.8, 47.5, 38.8, 47.5, 15.9852, 54.3613, 15.9852, 54.3613, -14.9507, 54.1845, -14.9507, 54.1845, -36.5, 48.1, -36.5, 48.1, -50.4828, 36.33, -50.4828, 36.33, -51.3668, -9.98545, -51.3668, -9.98545, -57.8889, -20.5885, -57.8889, -20.5885, -46.9473, -34.7342, -46.9473, -34.7342, -37.4014, -28.547, -37.4014, -28.547, -26.0876, -37.0323, -26.0876, -37.0323, -26.9862, -49.15, -26.9862, -49.15, -11.4152, -54.5332, -11.4152, -54.5332, -5.93512, -43.2195 )
  13. [node name="Test" type="Node2D"]
  14. script = ExtResource( 2 )
  15. [node name="Shapes" type="Node2D" parent="."]
  16. z_index = -1
  17. z_as_relative = false
  18. [node name="RigidBodyRectangle" type="RigidBody2D" parent="Shapes"]
  19. position = Vector2( 114.877, 248.76 )
  20. mode = 1
  21. [node name="CollisionShape2D" type="CollisionShape2D" parent="Shapes/RigidBodyRectangle"]
  22. rotation = -1.19206
  23. scale = Vector2( 1.2, 1.2 )
  24. shape = SubResource( 1 )
  25. [node name="RigidBodySphere" type="RigidBody2D" parent="Shapes"]
  26. position = Vector2( 314.894, 257.658 )
  27. mode = 1
  28. [node name="CollisionShape2D" type="CollisionShape2D" parent="Shapes/RigidBodySphere"]
  29. shape = SubResource( 2 )
  30. [node name="RigidBodyCapsule" type="RigidBody2D" parent="Shapes"]
  31. position = Vector2( 465.629, 261.204 )
  32. mode = 1
  33. [node name="CollisionShape2D" type="CollisionShape2D" parent="Shapes/RigidBodyCapsule"]
  34. rotation = -0.202458
  35. scale = Vector2( 1.2, 1.2 )
  36. shape = SubResource( 3 )
  37. [node name="RigidBodyConvexPolygon" type="RigidBody2D" parent="Shapes"]
  38. position = Vector2( 613.385, 252.771 )
  39. mode = 1
  40. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Shapes/RigidBodyConvexPolygon"]
  41. polygon = PoolVector2Array( 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 )
  42. [node name="GodotIcon" type="Sprite" parent="Shapes/RigidBodyConvexPolygon"]
  43. modulate = Color( 1, 1, 1, 0.392157 )
  44. texture = ExtResource( 1 )
  45. [node name="RigidBodyConcavePolygon" type="RigidBody2D" parent="Shapes"]
  46. position = Vector2( 771.159, 252.771 )
  47. mode = 1
  48. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Shapes/RigidBodyConcavePolygon"]
  49. polygon = PoolVector2Array( -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 )
  50. [node name="GodotIcon" type="Sprite" parent="Shapes/RigidBodyConcavePolygon"]
  51. modulate = Color( 1, 1, 1, 0.392157 )
  52. texture = ExtResource( 1 )
  53. [node name="RigidBodyConcaveSegments" type="RigidBody2D" parent="Shapes"]
  54. position = Vector2( 930.097, 252.771 )
  55. mode = 1
  56. [node name="CollisionShape2D" type="CollisionShape2D" parent="Shapes/RigidBodyConcaveSegments"]
  57. shape = SubResource( 4 )
  58. [node name="GodotIcon" type="Sprite" parent="Shapes/RigidBodyConcaveSegments"]
  59. modulate = Color( 1, 1, 1, 0.392157 )
  60. texture = ExtResource( 1 )