adds collision to spawned monsters, moves player position 3 units back

This commit is contained in:
Luca 2024-09-19 20:48:54 +02:00
parent f025f89401
commit e8f06e7b99
12 changed files with 251 additions and 121 deletions

View file

@ -1,8 +1,22 @@
[gd_scene load_steps=3 format=3 uid="uid://cytaswycabcel"]
[gd_scene load_steps=5 format=3 uid="uid://cytaswycabcel"]
[ext_resource type="Script" path="res://scripts/monster.gd" id="1_13xtk"]
[ext_resource type="Resource" uid="uid://ym438vedcdyl" path="res://resources/DebugMonster1.tres" id="2_rjclr"]
[ext_resource type="Material" uid="uid://ctul3e67rcq23" path="res://materials/CollisionDebugMaterial.tres" id="3_k6auu"]
[node name="Monster" type="Node3D"]
[sub_resource type="SphereShape3D" id="SphereShape3D_tjvna"]
radius = 0.4
[sub_resource type="SphereMesh" id="SphereMesh_aou7a"]
radius = 0.4
height = 0.8
[node name="Monster" type="CharacterBody3D"]
script = ExtResource("1_13xtk")
monster_stats = ExtResource("2_rjclr")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("SphereShape3D_tjvna")
[node name="CollisionVisualizer" type="MeshInstance3D" parent="."]
mesh = SubResource("SphereMesh_aou7a")
skeleton = NodePath("")
surface_material_override/0 = ExtResource("3_k6auu")