From 00ecd1f81033df1c7c803eb3e1219ecafd33f9b7 Mon Sep 17 00:00:00 2001 From: unfa Date: Sun, 19 Sep 2021 22:31:55 +0200 Subject: [PATCH] Updated Casing to newest Godot version --- Game/Assets/Weapons/Handgun/Casing.gd | 2 +- Game/Assets/Weapons/Handgun/Casing.tscn | 18 ++---------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/Game/Assets/Weapons/Handgun/Casing.gd b/Game/Assets/Weapons/Handgun/Casing.gd index 695d1ce..7d89343 100644 --- a/Game/Assets/Weapons/Handgun/Casing.gd +++ b/Game/Assets/Weapons/Handgun/Casing.gd @@ -1,4 +1,4 @@ -extends RigidBody3D +extends RigidDynamicBody3D @onready var sound = $Sound @onready var sound_player = sound.get_node("AudioStreamPlayer3D") diff --git a/Game/Assets/Weapons/Handgun/Casing.tscn b/Game/Assets/Weapons/Handgun/Casing.tscn index 810bc72..ddd6e27 100644 --- a/Game/Assets/Weapons/Handgun/Casing.tscn +++ b/Game/Assets/Weapons/Handgun/Casing.tscn @@ -1,25 +1,14 @@ -[gd_scene load_steps=6 format=3 uid="uid://dfwe3bvh8lbbp"] +[gd_scene load_steps=5 format=3 uid="uid://dfwe3bvh8lbbp"] [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"] [ext_resource type="PackedScene" uid="uid://c5cwnfuw4go1b" path="res://Assets/Audio/SoundPlayer.tscn" id="3_47hc3"] -[sub_resource type="PhysicsMaterial" id="1"] -friction = 0.7 -bounce = 0.7 - [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" ) -continuous_cd = true -contacts_reported = 1 -contact_monitor = true +[node name="Casing" type="RigidDynamicBody3D"] script = ExtResource( "1_kwgjj" ) [node name="CollisionShape3D" type="CollisionShape3D" parent="."] @@ -48,7 +37,4 @@ unit_size = 2.0 max_db = -3.0 pitch_scale = 1.5 -[connection signal="body_entered" from="." to="." method="_on_Casing_body_entered"] -[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"] - [editable path="Sound"]