test_perf_contact_islands.tscn 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. [gd_scene load_steps=8 format=3 uid="uid://vb6u0374prwg"]
  2. [ext_resource type="PackedScene" uid="uid://dv7rxhg55y3t6" path="res://tests/static_scene.tscn" id="1"]
  3. [ext_resource type="Script" path="res://tests/performance/test_perf_contacts.gd" id="2"]
  4. [ext_resource type="Texture2D" uid="uid://c5duuyhbmd0m4" path="res://assets/texture/godot-head.png" id="3"]
  5. [ext_resource type="PackedScene" uid="uid://blh3twy74kbkv" path="res://tests/test_options.tscn" id="4"]
  6. [sub_resource type="RectangleShape2D" id="1"]
  7. size = Vector2(10, 14)
  8. [sub_resource type="CircleShape2D" id="2"]
  9. radius = 5.0
  10. [sub_resource type="CapsuleShape2D" id="3"]
  11. radius = 5.0
  12. height = 17.0
  13. [node name="Test" type="Node2D"]
  14. script = ExtResource( "2" )
  15. _enable_debug_collision = false
  16. spawns = [NodePath("SpawnTarget1"), NodePath("SpawnTarget2"), NodePath("SpawnTarget3"), NodePath("SpawnTarget4"), NodePath("SpawnTarget5"), NodePath("SpawnTarget6"), NodePath("SpawnTarget7"), NodePath("SpawnTarget8"), NodePath("SpawnTarget9")]
  17. spawn_count = 300
  18. spawn_randomize = Vector2(10, 10)
  19. [node name="Options" parent="." instance=ExtResource( "4" )]
  20. [node name="SpawnTarget1" type="Node2D" parent="."]
  21. position = Vector2(145.646, 109.462)
  22. [node name="SpawnTarget2" type="Node2D" parent="."]
  23. position = Vector2(508.14, 109.113)
  24. [node name="SpawnTarget3" type="Node2D" parent="."]
  25. position = Vector2(873.995, 110.042)
  26. [node name="SpawnTarget4" type="Node2D" parent="."]
  27. position = Vector2(149.646, 301.462)
  28. [node name="SpawnTarget5" type="Node2D" parent="."]
  29. position = Vector2(512.14, 301.113)
  30. [node name="SpawnTarget6" type="Node2D" parent="."]
  31. position = Vector2(877.995, 302.042)
  32. [node name="SpawnTarget7" type="Node2D" parent="."]
  33. position = Vector2(165.646, 507.462)
  34. [node name="SpawnTarget8" type="Node2D" parent="."]
  35. position = Vector2(528.14, 507.113)
  36. [node name="SpawnTarget9" type="Node2D" parent="."]
  37. position = Vector2(893.995, 508.042)
  38. [node name="StaticScene" parent="." instance=ExtResource( "1" )]
  39. visible = false
  40. position = Vector2(0, 125.017)
  41. [node name="DynamicShapes" type="Node2D" parent="."]
  42. [node name="RigidBodyRectangle" type="RigidDynamicBody2D" parent="DynamicShapes"]
  43. position = Vector2(0, 1024)
  44. gravity_scale = 0.0
  45. [node name="CollisionShape2D" type="CollisionShape2D" parent="DynamicShapes/RigidBodyRectangle"]
  46. shape = SubResource( "1" )
  47. [node name="RigidBodySphere" type="RigidDynamicBody2D" parent="DynamicShapes"]
  48. position = Vector2(100, 1024)
  49. gravity_scale = 0.0
  50. [node name="CollisionShape2D" type="CollisionShape2D" parent="DynamicShapes/RigidBodySphere"]
  51. shape = SubResource( "2" )
  52. [node name="RigidBodyCapsule" type="RigidDynamicBody2D" parent="DynamicShapes"]
  53. position = Vector2(200, 1024)
  54. gravity_scale = 0.0
  55. [node name="CollisionShape2D" type="CollisionShape2D" parent="DynamicShapes/RigidBodyCapsule"]
  56. shape = SubResource( "3" )
  57. [node name="RigidBodyConvexPolygon" type="RigidDynamicBody2D" parent="DynamicShapes"]
  58. position = Vector2(300, 1024)
  59. gravity_scale = 0.0
  60. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="DynamicShapes/RigidBodyConvexPolygon"]
  61. scale = Vector2(0.1, 0.1)
  62. 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)
  63. [node name="GodotIcon" type="Sprite2D" parent="DynamicShapes/RigidBodyConvexPolygon"]
  64. self_modulate = Color(1, 1, 1, 0.392157)
  65. scale = Vector2(0.1, 0.1)
  66. texture = ExtResource( "3" )
  67. [node name="RigidBodyConcavePolygon" type="RigidDynamicBody2D" parent="DynamicShapes"]
  68. position = Vector2(400, 1024)
  69. gravity_scale = 0.0
  70. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="DynamicShapes/RigidBodyConcavePolygon"]
  71. scale = Vector2(0.1, 0.1)
  72. 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)
  73. [node name="GodotIcon" type="Sprite2D" parent="DynamicShapes/RigidBodyConcavePolygon"]
  74. self_modulate = Color(1, 1, 1, 0.392157)
  75. scale = Vector2(0.1, 0.1)
  76. texture = ExtResource( "3" )