From a9a0c76cd6d15302da44dcdc99f89f20e02d69fc Mon Sep 17 00:00:00 2001 From: Ichicoro Date: Sun, 8 Jan 2023 13:51:21 +0100 Subject: [PATCH] Fix crops not getting picked up by player --- island/CropTile.tscn | 10 ++++++---- island/Island.tscn | 2 +- island/Pineapple.tscn | 14 +++++++------- player/Player.tscn | 7 +------ 4 files changed, 15 insertions(+), 18 deletions(-) diff --git a/island/CropTile.tscn b/island/CropTile.tscn index d503936..0a7d3d3 100644 --- a/island/CropTile.tscn +++ b/island/CropTile.tscn @@ -6,10 +6,10 @@ [ext_resource type="AudioStream" uid="uid://lkftwgdun745" path="res://assets/pop.wav" id="3_gur2a"] [ext_resource type="Script" path="res://island/Pop.gd" id="4_5e7wk"] -[sub_resource type="BoxShape3D" id="BoxShape3D_65i68"] +[sub_resource type="BoxShape3D" id="BoxShape3D_rkrm1"] size = Vector3(1, 0.1, 1) -[sub_resource type="ArrayMesh" id="ArrayMesh_8e1gk"] +[sub_resource type="ArrayMesh" id="ArrayMesh_t1otr"] _surfaces = [{ "aabb": AABB(-0.5, 0, -0.5, 1.00001, 1.00001, 1), "attribute_data": PackedByteArray(143, 194, 117, 63, 183, 109, 91, 63, 31, 133, 107, 63, 219, 182, 109, 63, 31, 133, 107, 63, 183, 109, 91, 63, 143, 194, 117, 63, 219, 182, 109, 63, 143, 194, 117, 63, 183, 109, 91, 63, 31, 133, 107, 63, 183, 109, 91, 63, 31, 133, 107, 63, 219, 182, 109, 63, 143, 194, 117, 63, 219, 182, 109, 63, 143, 194, 117, 63, 183, 109, 91, 63, 31, 133, 107, 63, 183, 109, 91, 63, 31, 133, 107, 63, 219, 182, 109, 63, 143, 194, 117, 63, 219, 182, 109, 63, 143, 194, 117, 63, 183, 109, 91, 63, 31, 133, 107, 63, 183, 109, 91, 63, 31, 133, 107, 63, 219, 182, 109, 63, 143, 194, 117, 63, 219, 182, 109, 63), @@ -32,14 +32,16 @@ script = ExtResource("2_jejoo") [node name="Plant" type="Area3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.5, 0, 0.5) +collision_layer = 0 +collision_mask = 16 [node name="PlantableArea" type="CollisionShape3D" parent="Plant"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.05, 0) -shape = SubResource("BoxShape3D_65i68") +shape = SubResource("BoxShape3D_rkrm1") [node name="Sprout" type="MeshInstance3D" parent="Plant"] transform = Transform3D(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) -mesh = SubResource("ArrayMesh_8e1gk") +mesh = SubResource("ArrayMesh_t1otr") skeleton = NodePath("../../..") [node name="GrowthTimer" type="Timer" parent="."] diff --git a/island/Island.tscn b/island/Island.tscn index 17a3ee8..cb0021a 100644 --- a/island/Island.tscn +++ b/island/Island.tscn @@ -8,7 +8,7 @@ [ext_resource type="PackedScene" uid="uid://cxa5irr1atgke" path="res://island/PyramidSmallMesh.tscn" id="5_uf8hd"] [ext_resource type="PackedScene" uid="uid://bknwefv5ycc3u" path="res://island/PyramidSmolMesh.tscn" id="6_klmt8"] [ext_resource type="PackedScene" uid="uid://boxtb3trgcy8c" path="res://island/PillarMesh.tscn" id="7_grmwj"] -[ext_resource type="PackedScene" uid="uid://cwf11kdk7t64k" path="res://island/HoppityMesh.tscn" id="8_5pio0"] +[ext_resource type="PackedScene" path="res://island/HoppityMesh.tscn" id="8_5pio0"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_3uyyi"] render_priority = 0 diff --git a/island/Pineapple.tscn b/island/Pineapple.tscn index 61a6265..8d09074 100644 --- a/island/Pineapple.tscn +++ b/island/Pineapple.tscn @@ -5,15 +5,15 @@ [ext_resource type="AudioStream" uid="uid://lkftwgdun745" path="res://assets/pop.wav" id="3_b3ttd"] [ext_resource type="Script" path="res://island/Pop.gd" id="4_rn5e2"] -[sub_resource type="CylinderShape3D" id="CylinderShape3D_xodvb"] +[sub_resource type="CylinderShape3D" id="CylinderShape3D_3af3s"] height = 0.9 radius = 0.3 -[sub_resource type="CylinderShape3D" id="CylinderShape3D_fghe6"] +[sub_resource type="CylinderShape3D" id="CylinderShape3D_77mmo"] height = 6.0 radius = 3.0 -[sub_resource type="CylinderShape3D" id="CylinderShape3D_j5xpy"] +[sub_resource type="CylinderShape3D" id="CylinderShape3D_x36gm"] height = 1.4 radius = 0.7 @@ -25,7 +25,7 @@ linear_damp = 1.0 [node name="Shape" type="CollisionShape3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.45, 0) -shape = SubResource("CylinderShape3D_xodvb") +shape = SubResource("CylinderShape3D_3af3s") [node name="PineappleMesh" parent="." instance=ExtResource("1_ndmmp")] @@ -46,16 +46,16 @@ monitorable = false [node name="Shape" type="CollisionShape3D" parent="MoveTowardsPlayer/MagnetArea"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0) -shape = SubResource("CylinderShape3D_fghe6") +shape = SubResource("CylinderShape3D_77mmo") [node name="CaptureArea" type="Area3D" parent="MoveTowardsPlayer"] collision_layer = 0 -collision_mask = 0 +collision_mask = 4 monitorable = false [node name="Shape" type="CollisionShape3D" parent="MoveTowardsPlayer/CaptureArea"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0) -shape = SubResource("CylinderShape3D_j5xpy") +shape = SubResource("CylinderShape3D_x36gm") [connection signal="body_entered" from="MoveTowardsPlayer/MagnetArea" to="MoveTowardsPlayer" method="_on_magnet_area_body_entered"] [connection signal="body_entered" from="MoveTowardsPlayer/CaptureArea" to="MoveTowardsPlayer" method="_on_capture_area_body_entered"] diff --git a/player/Player.tscn b/player/Player.tscn index 8aa8584..b37a22b 100644 --- a/player/Player.tscn +++ b/player/Player.tscn @@ -129,7 +129,6 @@ grow_horizontal = 2 grow_vertical = 2 [node name="CameraViewportContainer" type="SubViewportContainer" parent="Head/Viewport"] -layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -169,7 +168,6 @@ theme = SubResource("Theme_smyke") [node name="FPS_Label" type="Label" parent="HUD"] visible = false -layout_mode = 1 anchors_preset = 1 anchor_left = 1.0 anchor_right = 1.0 @@ -182,7 +180,7 @@ horizontal_alignment = 2 script = SubResource("GDScript_iiadi") [node name="PointsSpawner" type="Control" parent="HUD"] -layout_mode = 1 +layout_mode = 3 anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 @@ -193,7 +191,6 @@ grow_vertical = 2 script = SubResource("GDScript_5d122") [node name="AmmoLabel" type="Label" parent="HUD"] -layout_mode = 1 anchors_preset = 3 anchor_left = 1.0 anchor_top = 1.0 @@ -218,7 +215,6 @@ metadata/_edit_lock_ = true [node name="SubViewportContainer" type="SubViewportContainer" parent="HUD"] visible = false show_behind_parent = true -layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -241,7 +237,6 @@ MainCamera = NodePath("../../../../Head/Viewport/CameraViewportContainer/GameVie [node name="Crosshair" type="ColorRect" parent="HUD"] material = SubResource("ShaderMaterial_2p6rt") -layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0