Files
godot-demo-projects/3d/physics_tests/tests/functional/test_raycasting.tscn
PouleyKetchoupp 6dd09308fa Fixes and adjustments in 3D physics tests
Add Functional Test / Stack & Pyramid
For testing stack stability.

Add Functional Test / Raycasts
Visually test raycast on different shapes.

Add Performance Test / Broadphase
Add/move/remove lots of non-colliding objects and measure time.

Fix leaks on exit
Some Nodes are copied and removed from the scene to be used as templates,
they need to be freed manually on exit.

Fix Performance Test / Contacts
Positions adjusted, some shape types were not created at the center.
2020-12-14 17:25:26 -07:00

75 lines
2.9 KiB
Plaintext

[gd_scene load_steps=10 format=2]
[ext_resource path="res://assets/robot_head/godot3_robot_head_collision.tres" type="Shape" id=1]
[ext_resource path="res://tests/functional/test_raycasting.gd" type="Script" id=2]
[ext_resource path="res://utils/exception_cylinder.gd" type="Script" id=3]
[ext_resource path="res://utils/camera_orbit.gd" type="Script" id=4]
[sub_resource type="BoxShape" id=1]
[sub_resource type="CapsuleShape" id=2]
[sub_resource type="CylinderShape" id=3]
[sub_resource type="ConvexPolygonShape" id=4]
points = PoolVector3Array( -0.7, 0, -0.7, -0.3, 0, 0.8, 0.8, 0, -0.3, 0, -1, 0 )
[sub_resource type="SphereShape" id=5]
[node name="Test" type="Spatial"]
script = ExtResource( 2 )
[node name="Shapes" type="Spatial" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 9.35591, 0 )
[node name="RigidBodyBox" type="RigidBody" parent="Shapes"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0, 0 )
mode = 3
[node name="CollisionShape" type="CollisionShape" parent="Shapes/RigidBodyBox"]
transform = Transform( 0.579556, 0.0885213, 0.145926, 0, 0.939693, -0.205212, -0.155291, 0.330366, 0.544604, 0, 0, 0 )
shape = SubResource( 1 )
[node name="RigidBodyCapsule" type="RigidBody" parent="Shapes"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -3, 0, 0 )
mode = 3
[node name="CollisionShape" type="CollisionShape" parent="Shapes/RigidBodyCapsule"]
transform = Transform( 0.8, 0, 0, 0, -1.30337e-07, -0.8, 0, 0.8, -1.30337e-07, 0, 0, 0 )
shape = SubResource( 2 )
[node name="RigidBodyCylinder" type="RigidBody" parent="Shapes"]
mode = 3
script = ExtResource( 3 )
[node name="CollisionShape" type="CollisionShape" parent="Shapes/RigidBodyCylinder"]
transform = Transform( 0.772741, -0.258819, 2.59821e-08, 0.2, 0.933013, -0.207055, 0.0535898, 0.25, 0.772741, 0, 0, 0 )
shape = SubResource( 3 )
[node name="RigidBodyConvex" type="RigidBody" parent="Shapes"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 3, -0.210678, 0 )
mode = 3
[node name="CollisionShape" type="CollisionShape" parent="Shapes/RigidBodyConvex"]
transform = Transform( 2, 0, 0, 0, 2.89766, -0.517939, 0, 0.776908, 1.93177, 0, 0.3533, 0 )
shape = SubResource( 4 )
[node name="RigidBodySphere" type="RigidBody" parent="Shapes"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0, 0 )
mode = 3
[node name="CollisionShape" type="CollisionShape" parent="Shapes/RigidBodySphere"]
transform = Transform( 1.2, 0, 0, 0, 1.2, 0, 0, 0, 1.2, 0, 0, 0 )
shape = SubResource( 5 )
[node name="StaticBodyHead" type="StaticBody" parent="Shapes"]
transform = Transform( 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, -6, 3.93357 )
[node name="CollisionShape" type="CollisionShape" parent="Shapes/StaticBodyHead"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0 )
shape = ExtResource( 1 )
[node name="Camera" type="Camera" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5.8667, 11.8164 )
script = ExtResource( 4 )