Player collision, asset update

This commit is contained in:
Thomas Muller 2024-12-29 21:33:01 -05:00
parent 944ea8b43e
commit 7321f63928
4 changed files with 15 additions and 13 deletions

2
assets

@ -1 +1 @@
Subproject commit 8c176d4dd741369ca16c9e847f31a6fdd83451fd Subproject commit b8f93367623ab37c4672c3898986e431c10ac145

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=26 format=3 uid="uid://bbqug1s083mdi"] [gd_scene load_steps=27 format=3 uid="uid://bbqug1s083mdi"]
[ext_resource type="PackedScene" uid="uid://ci2uamlnv8swy" path="res://assets/maps/levelpool.blend" id="1_cpckw"] [ext_resource type="PackedScene" uid="uid://ci2uamlnv8swy" path="res://assets/maps/levelpool.blend" id="1_cpckw"]
[ext_resource type="PackedScene" uid="uid://cy86jyiy6skvk" path="res://scenes/player.tscn" id="2_eggmh"] [ext_resource type="PackedScene" uid="uid://cy86jyiy6skvk" path="res://scenes/player.tscn" id="2_eggmh"]
@ -64,6 +64,9 @@ font_color = Color(0.396889, 0.396889, 0.396889, 1)
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_aa4aa"] [sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_aa4aa"]
points = PackedVector3Array(-0.3, -0.208738, -0.27433, -0.275039, -0.358724, -0.27433, -0.3, -0.208738, -0.174369, -0.3, 0.391276, -0.27433, 0.27498, -0.358724, -0.27433, -0.275039, -0.358724, 0.32567, -0.3, 0.391276, -0.174369, 0.3, 0.391276, -0.27433, 0.27498, -0.358724, 0.32567, 0.3, -0.208738, -0.27433, -0.275039, -0.283768, 0.32567, -0.200039, 0.291213, 0.32567, 0.3, 0.391276, -0.174369, 0.3, -0.208738, -0.174369, 0.27498, -0.283768, 0.32567, 0.19998, 0.291213, 0.32567) points = PackedVector3Array(-0.3, -0.208738, -0.27433, -0.275039, -0.358724, -0.27433, -0.3, -0.208738, -0.174369, -0.3, 0.391276, -0.27433, 0.27498, -0.358724, -0.27433, -0.275039, -0.358724, 0.32567, -0.3, 0.391276, -0.174369, 0.3, 0.391276, -0.27433, 0.27498, -0.358724, 0.32567, 0.3, -0.208738, -0.27433, -0.275039, -0.283768, 0.32567, -0.200039, 0.291213, 0.32567, 0.3, 0.391276, -0.174369, 0.3, -0.208738, -0.174369, 0.27498, -0.283768, 0.32567, 0.19998, 0.291213, 0.32567)
[sub_resource type="Environment" id="Environment_alnls"]
background_mode = 1
[node name="LevelPool" type="Node3D"] [node name="LevelPool" type="Node3D"]
[node name="OmniLight3D" type="OmniLight3D" parent="."] [node name="OmniLight3D" type="OmniLight3D" parent="."]
@ -75,19 +78,13 @@ omni_range = 162.191
[node name="levelpool" parent="." instance=ExtResource("1_cpckw")] [node name="levelpool" parent="." instance=ExtResource("1_cpckw")]
[node name="Light" parent="levelpool" index="1"] [node name="player" parent="levelpool" index="1"]
visible = false
light_energy = 9.0
shadow_enabled = true
omni_range = 34.554
[node name="player" parent="levelpool" index="2"]
visible = false visible = false
[node name="Text" parent="levelpool" index="8"] [node name="Text" parent="levelpool" index="7"]
visible = false visible = false
[node name="Plane" parent="levelpool" index="9"] [node name="Plane" parent="levelpool" index="8"]
visible = false visible = false
[node name="Player" parent="." instance=ExtResource("2_eggmh")] [node name="Player" parent="." instance=ExtResource("2_eggmh")]
@ -211,6 +208,9 @@ shape = SubResource("ConvexPolygonShape3D_aa4aa")
[node name="monitor01" parent="RigidBody3D/CollisionShape3D" instance=ExtResource("12_nw67b")] [node name="monitor01" parent="RigidBody3D/CollisionShape3D" instance=ExtResource("12_nw67b")]
transform = Transform3D(1, 0, 2.98023e-08, 0, 1, 0, -2.98023e-08, 0, 1, 0, -0.358724, 0.0256701) transform = Transform3D(1, 0, 2.98023e-08, 0, 1, 0, -2.98023e-08, 0, 1, 0, -0.358724, 0.0256701)
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_alnls")
[connection signal="body_entered" from="WinBox" to="WinBox" method="_on_body_entered"] [connection signal="body_entered" from="WinBox" to="WinBox" method="_on_body_entered"]
[connection signal="body_entered" from="Failure" to="Failure" method="_on_body_entered"] [connection signal="body_entered" from="Failure" to="Failure" method="_on_body_entered"]
[connection signal="activated_once" from="DialogTrigger" to="Kreb/StartDialog" method="play" binds= [0]] [connection signal="activated_once" from="DialogTrigger" to="Kreb/StartDialog" method="play" binds= [0]]

View file

@ -2,7 +2,8 @@
[ext_resource type="Script" path="res://scripts/player.gd" id="1_ocinr"] [ext_resource type="Script" path="res://scripts/player.gd" id="1_ocinr"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_ljkaw"] [sub_resource type="BoxShape3D" id="BoxShape3D_ed1e8"]
size = Vector3(1, 2, 1)
[sub_resource type="CapsuleMesh" id="CapsuleMesh_muavk"] [sub_resource type="CapsuleMesh" id="CapsuleMesh_muavk"]
@ -11,7 +12,7 @@ script = ExtResource("1_ocinr")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."] [node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
shape = SubResource("CapsuleShape3D_ljkaw") shape = SubResource("BoxShape3D_ed1e8")
[node name="CSGMesh3D" type="CSGMesh3D" parent="."] [node name="CSGMesh3D" type="CSGMesh3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)

View file

@ -50,6 +50,7 @@ func _process(_delta):
func _physics_process(delta): func _physics_process(delta):
_collider.global_basis = Basis.from_euler(Vector3.ZERO)
# Shamelessly stolen code from quake :) # Shamelessly stolen code from quake :)
var fmove = 0.0 var fmove = 0.0