playing with coin magnet

This commit is contained in:
derek
2025-06-25 17:03:45 -05:00
parent db85bf39c8
commit 3e506590a9
6 changed files with 45 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
[gd_scene load_steps=6 format=4 uid="uid://drmam18yg3du5"]
[gd_scene load_steps=7 format=4 uid="uid://drmam18yg3du5"]
[ext_resource type="Material" uid="uid://cuvfl1goud4at" path="res://Assets/Materials/GOLD.tres" id="1_2djid"]
[ext_resource type="Script" uid="uid://deq081gu1ort2" path="res://Scripts/gold.gd" id="1_b10cl"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_yxxlx"]
resource_name = "GOLD"
@@ -47,13 +48,15 @@ shadow_mesh = SubResource("ArrayMesh_hrwv8")
[sub_resource type="SphereShape3D" id="SphereShape3D_2djid"]
margin = 0.0
radius = 0.124843
radius = 0.0860376
[node name="GOLDCOIN" type="RigidBody3D"]
collision_layer = 0
collision_layer = 32
collision_mask = 33
mass = 0.1
continuous_cd = true
contact_monitor = true
script = ExtResource("1_b10cl")
[node name="Cylinder" type="MeshInstance3D" parent="."]
material_override = ExtResource("1_2djid")

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=13 format=3 uid="uid://bacgd5lmvaxea"]
[gd_scene load_steps=14 format=3 uid="uid://bacgd5lmvaxea"]
[ext_resource type="Script" uid="uid://bcgt64gerg8pv" path="res://Scripts/player.gd" id="1_5wxv7"]
[ext_resource type="Material" uid="uid://b4rpp31c0dx2m" path="res://Assets/Materials/BasicMat.tres" id="1_y6xdh"]
@@ -51,6 +51,9 @@ _data = {
&"dodge": SubResource("Animation_hck1p")
}
[sub_resource type="SphereShape3D" id="SphereShape3D_juxdh"]
radius = 2.5
[node name="Player" type="CharacterBody3D"]
script = ExtResource("1_5wxv7")
@@ -98,3 +101,12 @@ shape = SubResource("CapsuleShape3D_y5hcb")
libraries = {
&"": SubResource("AnimationLibrary_4qbli")
}
[node name="Area3D" type="Area3D" parent="."]
collision_layer = 32
collision_mask = 32
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
shape = SubResource("SphereShape3D_juxdh")
[connection signal="body_entered" from="Area3D" to="." method="_on_area_3d_body_entered"]