test_rigidbody_impact.tscn 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. [gd_scene load_steps=10 format=3 uid="uid://cw38dssdgqkti"]
  2. [ext_resource type="Script" path="res://utils/rigidbody_pick.gd" id="1"]
  3. [ext_resource type="Script" path="res://test.gd" id="2"]
  4. [ext_resource type="PackedScene" uid="uid://3gkujifjokqw" path="res://tests/static_scene_plane.tscn" id="3"]
  5. [ext_resource type="Script" path="res://utils/camera_orbit.gd" id="4"]
  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="RigidDynamicBody3D" parent="DynamicShapes"]
  17. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 1, 0)
  18. axis_lock_angular_x = true
  19. axis_lock_angular_y = true
  20. axis_lock_angular_z = true
  21. script = ExtResource( "1" )
  22. [node name="CollisionShape" type="CollisionShape3D" parent="DynamicShapes/RigidBodyBox"]
  23. transform = Transform3D(0.6, 0, 0, 0, 1, 0, 0, 0, 0.6, 0, 0, 0)
  24. shape = SubResource( "1" )
  25. [node name="RigidBodyCapsule" type="RigidDynamicBody3D" parent="DynamicShapes"]
  26. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3, 1.0034, 0)
  27. axis_lock_angular_x = true
  28. axis_lock_angular_y = true
  29. axis_lock_angular_z = true
  30. script = ExtResource( "1" )
  31. [node name="CollisionShape" type="CollisionShape3D" parent="DynamicShapes/RigidBodyCapsule"]
  32. transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0, 0)
  33. shape = SubResource( "2" )
  34. [node name="RigidBodyCylinder" type="RigidDynamicBody3D" parent="DynamicShapes"]
  35. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.0034, 0)
  36. axis_lock_angular_x = true
  37. axis_lock_angular_y = true
  38. axis_lock_angular_z = true
  39. script = ExtResource( "1" )
  40. [node name="CollisionShape" type="CollisionShape3D" parent="DynamicShapes/RigidBodyCylinder"]
  41. transform = Transform3D(0.8, 0, 0, 0, 1, 0, 0, 0, 0.8, 0, 0, 0)
  42. shape = SubResource( "3" )
  43. [node name="RigidBodyConvex" type="RigidDynamicBody3D" parent="DynamicShapes"]
  44. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 1.97795, 0)
  45. axis_lock_angular_x = true
  46. axis_lock_angular_y = true
  47. axis_lock_angular_z = true
  48. script = ExtResource( "1" )
  49. [node name="CollisionShape" type="CollisionShape3D" parent="DynamicShapes/RigidBodyConvex"]
  50. transform = Transform3D(1.5, 0, 0, 0, 2, 0, 0, 0, 1.5, 0, 0, 0)
  51. shape = SubResource( "4" )
  52. [node name="RigidBodySphere" type="RigidDynamicBody3D" parent="DynamicShapes"]
  53. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 1, 0)
  54. axis_lock_angular_x = true
  55. axis_lock_angular_y = true
  56. axis_lock_angular_z = true
  57. script = ExtResource( "1" )
  58. [node name="CollisionShape" type="CollisionShape3D" parent="DynamicShapes/RigidBodySphere"]
  59. transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0, 0)
  60. shape = SubResource( "5" )
  61. [node name="StaticBodyPlane" parent="." instance=ExtResource( "3" )]
  62. [node name="Camera3D" type="Camera3D" parent="."]
  63. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.604, 22.124)
  64. fov = 35.0
  65. script = ExtResource( "4" )
  66. [node name="OmniLight" type="OmniLight3D" parent="Camera3D"]
  67. omni_range = 50.0