test_shapes.tscn 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. [gd_scene load_steps=10 format=3 uid="uid://dmvgjuovguvg7"]
  2. [ext_resource type="Script" uid="uid://cy2w4686igcmr" path="res://utils/rigidbody_pick.gd" id="1"]
  3. [ext_resource type="Script" uid="uid://cu0nmknf22ua2" path="res://test.gd" id="2"]
  4. [ext_resource type="Script" uid="uid://cx8vo58lobtgu" path="res://utils/camera_orbit.gd" id="4"]
  5. [ext_resource type="PackedScene" uid="uid://cl2vpuxqgnylc" path="res://tests/static_scene.tscn" id="6"]
  6. [sub_resource type="BoxShape3D" id="1"]
  7. [sub_resource type="CapsuleShape3D" id="2"]
  8. [sub_resource type="CylinderShape3D" id="3"]
  9. [sub_resource type="ConvexPolygonShape3D" id="4"]
  10. points = PackedVector3Array(-0.7, 0, -0.7, -0.3, 0, 0.8, 0.8, 0, -0.3, 0, -1, 0)
  11. [sub_resource type="SphereShape3D" id="5"]
  12. [node name="Test" type="Node3D"]
  13. script = ExtResource("2")
  14. [node name="DynamicShapes" type="Node3D" parent="."]
  15. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 9.35591, 0)
  16. [node name="RigidBodyBox" type="RigidBody3D" parent="DynamicShapes"]
  17. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0, 0)
  18. script = ExtResource("1")
  19. [node name="CollisionShape" type="CollisionShape3D" parent="DynamicShapes/RigidBodyBox"]
  20. transform = Transform3D(0.579556, 0.0885213, 0.145926, 0, 0.939693, -0.205212, -0.155291, 0.330366, 0.544604, 0, 0, 0)
  21. shape = SubResource("1")
  22. debug_color = Color(1, 1, 0, 1)
  23. [node name="RigidBodyCapsule" type="RigidBody3D" parent="DynamicShapes"]
  24. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3, 0, 0)
  25. script = ExtResource("1")
  26. [node name="CollisionShape" type="CollisionShape3D" parent="DynamicShapes/RigidBodyCapsule"]
  27. transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0, 0)
  28. shape = SubResource("2")
  29. debug_color = Color(1, 1, 0, 1)
  30. [node name="RigidBodyCylinder" type="RigidBody3D" parent="DynamicShapes"]
  31. script = ExtResource("1")
  32. [node name="CollisionShape" type="CollisionShape3D" parent="DynamicShapes/RigidBodyCylinder"]
  33. transform = Transform3D(0.772741, -0.258819, 2.59821e-08, 0.2, 0.933013, -0.207055, 0.0535898, 0.25, 0.772741, 0, 0, 0)
  34. shape = SubResource("3")
  35. debug_color = Color(1, 1, 0, 1)
  36. [node name="RigidBodyConvex" type="RigidBody3D" parent="DynamicShapes"]
  37. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 0, 0)
  38. script = ExtResource("1")
  39. [node name="CollisionShape" type="CollisionShape3D" parent="DynamicShapes/RigidBodyConvex"]
  40. transform = Transform3D(1.5, 0, 0, 0, 1.93185, -0.388229, 0, 0.517638, 1.44889, 0, 0, 0)
  41. shape = SubResource("4")
  42. debug_color = Color(1, 1, 0, 1)
  43. [node name="RigidBodySphere" type="RigidBody3D" parent="DynamicShapes"]
  44. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0, 0)
  45. script = ExtResource("1")
  46. [node name="CollisionShape" type="CollisionShape3D" parent="DynamicShapes/RigidBodySphere"]
  47. transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0, 0)
  48. shape = SubResource("5")
  49. debug_color = Color(1, 1, 0, 1)
  50. [node name="StaticScene" parent="." instance=ExtResource("6")]
  51. [node name="Camera3D" type="Camera3D" parent="."]
  52. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4.53602, 22.1236)
  53. script = ExtResource("4")