friction and sand pit

This commit is contained in:
Haze Weathers 2025-02-22 21:12:25 -05:00
parent 08712cf22c
commit 77ef1dee48
5 changed files with 81 additions and 35 deletions

31
objects/sand_pit.tscn Normal file
View file

@ -0,0 +1,31 @@
[gd_scene load_steps=4 format=3 uid="uid://bfic5n608nc5j"]
[ext_resource type="Texture2D" uid="uid://djx2x3jjn01w2" path="res://assets/textures/world/sand.png" id="1_yg8om"]
[ext_resource type="Script" path="res://objects/sand_pit.gd" id="2_vtyum"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_r0cip"]
shading_mode = 2
specular_mode = 2
albedo_texture = ExtResource("1_yg8om")
metallic_specular = 0.0
uv1_triplanar = true
uv1_world_triplanar = true
texture_filter = 0
[node name="SandPit" type="CSGPolygon3D" node_paths=PackedStringArray("collision_polygon")]
process_physics_priority = 100
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0)
depth = 0.03
material = SubResource("StandardMaterial3D_r0cip")
script = ExtResource("2_vtyum")
friction = 9.0
collision_polygon = NodePath("Area3D/CollisionPolygon3D")
[node name="Area3D" type="Area3D" parent="."]
collision_layer = 0
collision_mask = 16
[node name="CollisionPolygon3D" type="CollisionPolygon3D" parent="Area3D"]
[connection signal="body_entered" from="Area3D" to="." method="_on_body_entered"]
[connection signal="body_exited" from="Area3D" to="." method="_on_body_exited"]