2023-01-08 08:22:44 +00:00
|
|
|
[gd_scene load_steps=5 format=3 uid="uid://v7bv81krh12e"]
|
|
|
|
|
|
|
|
[ext_resource type="PackedScene" uid="uid://bwwpi0itor6cw" path="res://island/PineappleMesh.tscn" id="1_ndmmp"]
|
|
|
|
[ext_resource type="Script" path="res://island/MoveTowardsPlayer.gd" id="2_d3itl"]
|
|
|
|
|
|
|
|
[sub_resource type="CylinderShape3D" id="CylinderShape3D_t5bjw"]
|
|
|
|
height = 0.9
|
|
|
|
radius = 0.3
|
|
|
|
|
|
|
|
[sub_resource type="CylinderShape3D" id="CylinderShape3D_m5gp0"]
|
|
|
|
height = 6.0
|
|
|
|
radius = 3.0
|
|
|
|
|
|
|
|
[node name="Pineapple" type="RigidBody3D"]
|
|
|
|
collision_layer = 2
|
2023-01-08 09:20:01 +00:00
|
|
|
collision_mask = 3
|
2023-01-08 08:22:44 +00:00
|
|
|
lock_rotation = true
|
2023-01-08 09:01:13 +00:00
|
|
|
linear_damp = 1.0
|
2023-01-08 08:22:44 +00:00
|
|
|
|
|
|
|
[node name="Shape" type="CollisionShape3D" parent="."]
|
|
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.45, 0)
|
|
|
|
shape = SubResource("CylinderShape3D_t5bjw")
|
|
|
|
|
|
|
|
[node name="PineappleMesh" parent="." instance=ExtResource("1_ndmmp")]
|
|
|
|
|
2023-01-08 09:11:38 +00:00
|
|
|
[node name="MoveTowardsPlayer" type="Node3D" parent="." node_paths=PackedStringArray("target")]
|
2023-01-08 08:22:44 +00:00
|
|
|
script = ExtResource("2_d3itl")
|
|
|
|
force_multiplier = 1250.0
|
2023-01-08 09:11:38 +00:00
|
|
|
target = NodePath("..")
|
2023-01-08 08:22:44 +00:00
|
|
|
|
|
|
|
[node name="MagnetArea" type="Area3D" parent="MoveTowardsPlayer"]
|
|
|
|
collision_layer = 0
|
|
|
|
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_m5gp0")
|
|
|
|
|
|
|
|
[connection signal="body_entered" from="MoveTowardsPlayer/MagnetArea" to="MoveTowardsPlayer" method="_on_magnet_area_body_entered"]
|