Rotating 3D chairs

This commit is contained in:
Marco 2025-09-18 09:24:22 +02:00
commit f7448eb3f5
5 changed files with 232 additions and 147 deletions

View file

@ -1,21 +1,20 @@
[gd_scene load_steps=6 format=3 uid="uid://dmwtysh7eijon"]
[gd_scene load_steps=5 format=3 uid="uid://dmwtysh7eijon"]
[ext_resource type="Script" uid="uid://ccxnvbthsvka3" path="res://Scripts/Actors/Destructible3D.cs" id="1_q4vm8"]
[ext_resource type="Resource" uid="uid://bpreje4f8ok62" path="res://Resources/Bullets/3D/Explosion_3D.tres" id="2_hbvng"]
[ext_resource type="Script" uid="uid://ddsqqfx1usc3j" path="res://Scripts/Resources/DamageResistance.cs" id="3_jiv17"]
[ext_resource type="Script" uid="uid://46bleylruayt" path="res://Scripts/Actors/3D/Chair3D.cs" id="1_lak88"]
[ext_resource type="SpriteFrames" uid="uid://sg77hbw6lo6r" path="res://Resources/Sprites/Chair.tres" id="5_265cv"]
[sub_resource type="CylinderShape3D" id="CylinderShape3D_2libs"]
height = 0.564575
radius = 0.321777
[sub_resource type="CylinderShape3D" id="CylinderShape3D_q4vm8"]
height = 0.5595703
radius = 0.3227539
[node name="StaticBody3D" type="StaticBody3D" groups=["Destroyable"]]
collision_layer = 16
collision_mask = 0
script = ExtResource("1_q4vm8")
Indestructible = true
ExplosionData = ExtResource("2_hbvng")
DamageResistances = Array[ExtResource("3_jiv17")]([])
script = ExtResource("1_lak88")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0376587, 0)
@ -26,5 +25,15 @@ transform = Transform3D(0.70710677, -0.49999997, 0.49999997, 0, 0.70710677, 0.70
pixel_size = 0.05
texture_filter = 0
sprite_frames = ExtResource("5_265cv")
animation = &"Spin"
frame_progress = 0.36955565
animation = &"Down"
autoplay = "Down"
[node name="Area3D" type="Area3D" parent="."]
collision_layer = 0
collision_mask = 136
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.029785156, 0)
shape = SubResource("CylinderShape3D_q4vm8")
[connection signal="area_entered" from="Area3D" to="." method="OnBulletCollision"]