add collisions and player gravity

This commit is contained in:
2024-08-02 00:58:22 -03:00
parent b4faa5d35b
commit 0e6540daf5
6 changed files with 15 additions and 7 deletions

View File

@ -2,7 +2,7 @@
[ext_resource type="Script" path="res://Scripts/Main.gd" id="1_2yjjx"]
[ext_resource type="PackedScene" uid="uid://deff7lt34nj0h" path="res://Spaces/Dungeon.tscn" id="2_4gs22"]
[ext_resource type="PackedScene" uid="uid://d3e3a6xdwo2dp" path="res://Scenes/Player.tscn" id="3_eq7hn"]
[ext_resource type="PackedScene" uid="uid://b83k3b5x1wmyl" path="res://Scenes/Player.tscn" id="3_eq7hn"]
[sub_resource type="Environment" id="Environment_pn2uj"]

View File

@ -1,7 +1,11 @@
[gd_scene load_steps=2 format=3 uid="uid://d3e3a6xdwo2dp"]
[gd_scene load_steps=3 format=3 uid="uid://b83k3b5x1wmyl"]
[ext_resource type="Script" path="res://Scripts/Player.gd" id="1_m1g7d"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_pfjla"]
radius = 0.4
height = 1.4
[node name="Player" type="CharacterBody3D" node_paths=PackedStringArray("camera")]
script = ExtResource("1_m1g7d")
camera = NodePath("Pivot/Camera3D")
@ -9,3 +13,6 @@ camera = NodePath("Pivot/Camera3D")
[node name="Pivot" type="Node3D" parent="."]
[node name="Camera3D" type="Camera3D" parent="Pivot"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("CapsuleShape3D_pfjla")