retrace/Level/PathTestWorld.tscn
karl 4d66d64d04 Ground collision hotfix
The ground needs to be a PhysicsBody for the collision to work.

Also added colliders to the boxes to further test collision.

The collision seems to have caused some issues with the Meldewesen
pathfinding - I think I know what's wrong, will fix soon.
2019-11-02 19:33:41 +01:00

103 lines
5.9 KiB
Plaintext

[gd_scene load_steps=14 format=2]
[ext_resource path="res://Characters/Player/Player.tscn" type="PackedScene" id=1]
[ext_resource path="res://Characters/Util/PathNavigatorForKinematicBody.tscn" type="PackedScene" id=2]
[ext_resource path="res://Characters/Meldewesen/Meldewesen.tscn" type="PackedScene" id=3]
[ext_resource path="res://Util/NodeGroupNotifier.tscn" type="PackedScene" id=4]
[sub_resource type="NavigationMesh" id=1]
vertices = PoolVector3Array( -1.3, 0.4, -1.6, 0.200001, 0.4, -1.6, 0.200001, 0.4, -9.4, -9.4, 0.4, -0.0999994, -1.6, 0.4, -0.0999994, -1.3, 0.4, -1.6, 0.200001, 0.4, -9.4, -9.4, 0.4, -9.4, 0.200001, 0.4, -9.4, 0.200001, 0.4, -1.6, 1.4, 0.4, -1.6, 1.4, 0.4, -1.6, 1.7, 0.4, -0.0999994, 9.5, 0.4, -0.0999994, 9.5, 0.4, -9.4, 0.200001, 0.4, -9.4, 0.200001, 0.4, 9.5, 0.200001, 0.4, 8.3, -1.6, 0.4, 8, -9.4, 0.4, 9.5, -1.6, 0.4, 5, 0.200001, 0.4, 4.7, 0.200001, 0.4, 1.7, -1.6, 0.4, 1.4, -1.6, 0.4, 5, -1.6, 0.4, 1.4, -9.4, 0.4, -0.0999994, -9.4, 0.4, 9.5, -1.6, 0.4, 1.4, -1.6, 0.4, -0.0999994, -9.4, 0.4, -0.0999994, -9.4, 0.4, 9.5, -1.6, 0.4, 8, -1.6, 0.4, 5, 1.7, 0.4, 8, 0.200001, 0.4, 8.3, 0.200001, 0.4, 9.5, 9.5, 0.4, 9.5, 0.200001, 0.4, 1.7, 0.200001, 0.4, 4.7, 1.7, 0.4, 5, 1.7, 0.4, 1.4, 1.7, 0.4, 5, 9.5, 0.4, 9.5, 9.5, 0.4, -0.0999994, 1.7, 0.4, 1.4, 1.7, 0.4, 5, 1.7, 0.4, 8, 9.5, 0.4, 9.5, 9.5, 0.4, -0.0999994, 1.7, 0.4, -0.0999994, 1.7, 0.4, 1.4 )
polygons = [ PoolIntArray( 2, 0, 1 ), PoolIntArray( 7, 3, 6 ), PoolIntArray( 3, 5, 6 ), PoolIntArray( 3, 4, 5 ), PoolIntArray( 10, 8, 9 ), PoolIntArray( 15, 11, 14 ), PoolIntArray( 11, 12, 14 ), PoolIntArray( 12, 13, 14 ), PoolIntArray( 19, 16, 18 ), PoolIntArray( 16, 17, 18 ), PoolIntArray( 23, 20, 22 ), PoolIntArray( 20, 21, 22 ), PoolIntArray( 27, 24, 26 ), PoolIntArray( 24, 25, 26 ), PoolIntArray( 30, 28, 29 ), PoolIntArray( 33, 31, 32 ), PoolIntArray( 37, 34, 36 ), PoolIntArray( 34, 35, 36 ), PoolIntArray( 41, 38, 40 ), PoolIntArray( 38, 39, 40 ), PoolIntArray( 45, 42, 44 ), PoolIntArray( 42, 43, 44 ), PoolIntArray( 48, 46, 47 ), PoolIntArray( 51, 49, 50 ) ]
[sub_resource type="CubeMesh" id=2]
[sub_resource type="ConcavePolygonShape" id=7]
data = PoolVector3Array( -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1 )
[sub_resource type="ConcavePolygonShape" id=8]
data = PoolVector3Array( -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1 )
[sub_resource type="PlaneMesh" id=3]
size = Vector2( 20, 20 )
[sub_resource type="ConcavePolygonShape" id=9]
data = PoolVector3Array( 10, 0, 10, -10, 0, 10, 10, 0, -10, -10, 0, 10, -10, 0, -10, 10, 0, -10 )
[sub_resource type="BoxShape" id=4]
extents = Vector3( 10, 1, 10 )
[sub_resource type="SphereShape" id=5]
[sub_resource type="SphereMesh" id=6]
[node name="Navigation" type="Navigation"]
[node name="Player" parent="." instance=ExtResource( 1 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.634059, 0.9426, 8.83401 )
[node name="DirectionalLight" type="DirectionalLight" parent="."]
transform = Transform( 0.766044, -0.582564, 0.271654, 0, 0.422618, 0.906308, -0.642788, -0.694272, 0.323744, 0, 5, 0 )
light_energy = 0.19
[node name="NavigationMeshInstance" type="NavigationMeshInstance" parent="."]
navmesh = SubResource( 1 )
[node name="MeshInstance" type="MeshInstance" parent="NavigationMeshInstance"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0 )
mesh = SubResource( 2 )
material/0 = null
[node name="StaticBody" type="StaticBody" parent="NavigationMeshInstance/MeshInstance"]
[node name="CollisionShape" type="CollisionShape" parent="NavigationMeshInstance/MeshInstance/StaticBody"]
shape = SubResource( 7 )
[node name="MeshInstance3" type="MeshInstance" parent="NavigationMeshInstance"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 6.53892 )
mesh = SubResource( 2 )
material/0 = null
[node name="StaticBody" type="StaticBody" parent="NavigationMeshInstance/MeshInstance3"]
[node name="CollisionShape" type="CollisionShape" parent="NavigationMeshInstance/MeshInstance3/StaticBody"]
shape = SubResource( 8 )
[node name="MeshInstance2" type="MeshInstance" parent="NavigationMeshInstance"]
mesh = SubResource( 3 )
material/0 = null
[node name="StaticBody" type="StaticBody" parent="NavigationMeshInstance/MeshInstance2"]
[node name="CollisionShape" type="CollisionShape" parent="NavigationMeshInstance/MeshInstance2/StaticBody"]
shape = SubResource( 9 )
[node name="GroundBody" type="StaticBody" parent="NavigationMeshInstance"]
[node name="CollisionShape" type="CollisionShape" parent="NavigationMeshInstance/GroundBody"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0 )
shape = SubResource( 4 )
[node name="PathNavigatorForKinematicBody" parent="." instance=ExtResource( 2 )]
editor/display_folded = true
body_nodepath = NodePath("Meldewesen")
[node name="Meldewesen" parent="PathNavigatorForKinematicBody" instance=ExtResource( 3 )]
[node name="NodeGroupNotifier" parent="." instance=ExtResource( 4 )]
group_name = "Navigator"
node_to_send = NodePath("..")
[node name="DummyPlayer" type="StaticBody" parent="." groups=[
"Player",
]]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 5.65981, 1, 2 )
collision_layer = 5
collision_mask = 5
[node name="CollisionShape" type="CollisionShape" parent="DummyPlayer"]
shape = SubResource( 5 )
[node name="MeshInstance" type="MeshInstance" parent="DummyPlayer"]
mesh = SubResource( 6 )
material/0 = null