test_perf_contacts.tscn 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. [gd_scene load_steps=8 format=3 uid="uid://bsieda0p35qu3"]
  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(20, 30)
  8. [sub_resource type="CircleShape2D" id="2"]
  9. radius = 15.0
  10. [sub_resource type="CapsuleShape2D" id="3"]
  11. height = 35.0
  12. [node name="Test" type="Node2D"]
  13. script = ExtResource( "2" )
  14. _enable_debug_collision = false
  15. spawns = [NodePath("SpawnTarget1")]
  16. spawn_count = 500
  17. spawn_randomize = Vector2(10, 10)
  18. [node name="Options" parent="." instance=ExtResource( "4" )]
  19. [node name="SpawnTarget1" type="Node2D" parent="."]
  20. position = Vector2(512, 400)
  21. [node name="StaticScene" parent="." instance=ExtResource( "1" )]
  22. position = Vector2(0, 125.017)
  23. [node name="DynamicShapes" type="Node2D" parent="."]
  24. [node name="RigidBodyRectangle" type="RigidDynamicBody2D" parent="DynamicShapes"]
  25. position = Vector2(0, 1024)
  26. [node name="CollisionShape2D" type="CollisionShape2D" parent="DynamicShapes/RigidBodyRectangle"]
  27. shape = SubResource( "1" )
  28. [node name="RigidBodySphere" type="RigidDynamicBody2D" parent="DynamicShapes"]
  29. position = Vector2(100, 1024)
  30. [node name="CollisionShape2D" type="CollisionShape2D" parent="DynamicShapes/RigidBodySphere"]
  31. shape = SubResource( "2" )
  32. [node name="RigidBodyCapsule" type="RigidDynamicBody2D" parent="DynamicShapes"]
  33. position = Vector2(200, 1024)
  34. [node name="CollisionShape2D" type="CollisionShape2D" parent="DynamicShapes/RigidBodyCapsule"]
  35. shape = SubResource( "3" )
  36. [node name="RigidBodyConvexPolygon" type="RigidDynamicBody2D" parent="DynamicShapes"]
  37. position = Vector2(300, 1024)
  38. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="DynamicShapes/RigidBodyConvexPolygon"]
  39. scale = Vector2(0.25, 0.25)
  40. 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)
  41. [node name="GodotIcon" type="Sprite2D" parent="DynamicShapes/RigidBodyConvexPolygon"]
  42. self_modulate = Color(1, 1, 1, 0.392157)
  43. scale = Vector2(0.25, 0.25)
  44. texture = ExtResource( "3" )
  45. [node name="RigidBodyConcavePolygon" type="RigidDynamicBody2D" parent="DynamicShapes"]
  46. position = Vector2(400, 1024)
  47. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="DynamicShapes/RigidBodyConcavePolygon"]
  48. scale = Vector2(0.25, 0.25)
  49. 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)
  50. [node name="GodotIcon" type="Sprite2D" parent="DynamicShapes/RigidBodyConcavePolygon"]
  51. self_modulate = Color(1, 1, 1, 0.392157)
  52. scale = Vector2(0.25, 0.25)
  53. texture = ExtResource( "3" )