diff --git a/Nodes/Player.tscn b/Nodes/Player.tscn index 5876e14..1bda03c 100644 --- a/Nodes/Player.tscn +++ b/Nodes/Player.tscn @@ -22,6 +22,7 @@ animations = [{ radius = 0.494048 [sub_resource type="CylinderShape3D" id="CylinderShape3D_8lrgm"] +radius = 0.808068 [node name="CharacterBody3D" type="CharacterBody3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3, 0) @@ -39,7 +40,6 @@ transform = Transform3D(1.57581, 0, 0, 0, 2.16936, 0, 0, 0, 1.5749, 0, 0, 0) shape = SubResource("CylinderShape3D_h8ivv") [node name="HitBox" type="Area3D" parent="."] -collision_mask = 4 [node name="CollisionShape3D" type="CollisionShape3D" parent="HitBox"] transform = Transform3D(2.74062, 0, 0, 0, 2.24144, 0, 0, 0, 2.70992, 0, 0, 0) diff --git a/Storage.tscn b/Storage.tscn index 2bcf470..0e08383 100644 --- a/Storage.tscn +++ b/Storage.tscn @@ -5,7 +5,7 @@ [sub_resource type="CylinderShape3D" id="CylinderShape3D_c1ipa"] height = 3.60519 -radius = 2.08877 +radius = 1.33696 [node name="Storage" type="StaticBody3D"] script = ExtResource("1_guwoh") diff --git a/project.godot b/project.godot index 127a278..80c0093 100644 --- a/project.godot +++ b/project.godot @@ -29,7 +29,7 @@ _global_script_classes=[{ "language": &"GDScript", "path": "res://scripts/Logic/MapNode.gd" }, { -"base": "Node", +"base": "StaticBody3D", "class": &"Module", "language": &"GDScript", "path": "res://scripts/Modules/Module.gd" diff --git a/scripts/Player.gd b/scripts/Player.gd index dcd9acc..d5743c0 100644 --- a/scripts/Player.gd +++ b/scripts/Player.gd @@ -64,6 +64,7 @@ func check_interaction(): if Input.is_action_just_pressed(action): for body in $HitBox.get_overlapping_bodies(): if body is Module: + #Storage interaction if not inventory && body is Storage: body.interact(self) @@ -73,3 +74,4 @@ func check_interaction(): func fill_inventory(type): self.inventory = 1 self.resource = type + print(self.resource)