Set simple physics layers, disabled shell casing collision with players

unbroken
unfa 2021-09-07 23:36:02 +02:00
parent 54e9d9cf44
commit e654f7e692
4 changed files with 51 additions and 11 deletions

View File

@ -74,6 +74,8 @@ anim_offset_max = 100.0
collision_friction = 1.0
[node name="Player" type="CharacterBody3D"]
collision_layer = 2
collision_mask = 7
script = ExtResource( "1" )
[node name="Mesh" type="MeshInstance3D" parent="."]

View File

@ -1,24 +1,35 @@
[gd_scene load_steps=4 format=2]
[gd_scene load_steps=5 format=3 uid="uid://dfwe3bvh8lbbp"]
[ext_resource path="res://Assets/Weapons/Handgun/Casing.gltf" type="PackedScene" id=1]
[ext_resource type="PackedScene" uid="uid://b6aa41e8u5cxi" path="res://Assets/Weapons/Handgun/Casing.gltf" id="1"]
[ext_resource type="Script" path="res://Assets/Weapons/Handgun/Casing.gd" id="1_kwgjj"]
[sub_resource type="PhysicsMaterial" id=1]
[sub_resource type="PhysicsMaterial" id="1"]
friction = 0.7
bounce = 0.7
bounce = 0.2
[sub_resource type="CylinderShape3D" id=2]
[sub_resource type="CylinderShape3D" id="2"]
radius = 0.0119513
height = 0.0560047
[node name="Casing" type="RigidBody3D"]
collision_layer = 8
collision_mask = 9
mass = 0.01
physics_material_override = SubResource( 1 )
physics_material_override = SubResource( "1" )
continuous_cd = true
script = null
script = ExtResource( "1_kwgjj" )
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(-4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0, 1, 0, 0, 0)
shape = SubResource( 2 )
shape = SubResource( "2" )
script = null
[node name="Casing" parent="." instance=ExtResource( 1 )]
[node name="Casing" parent="." instance=ExtResource( "1" )]
[node name="Timer" type="Timer" parent="."]
wait_time = 5.0
one_shot = true
autostart = true
script = null
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]

File diff suppressed because one or more lines are too long

View File

@ -122,6 +122,13 @@ say_cancel={
]
}
[layer_names]
3d_physics/layer_1="World"
3d_physics/layer_2="Players"
3d_physics/layer_3="Pickups"
3d_physics/layer_4="Decoration"
[rendering]
environment/ssao/quality=0