A Minecraft style clone in Godot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

41 lines
1.5 KiB

[gd_scene load_steps=5 format=3 uid="uid://beu1b4leqwgh3"]
[ext_resource type="Script" uid="uid://daly0bs0oat3j" path="res://scenes/player/player.gd" id="1_7sql3"]
[ext_resource type="Script" uid="uid://bruuttf8j7wet" path="res://scenes/player/ray_cast_look.gd" id="2_dovo2"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_tv3cd"]
radius = 0.47
height = 1.95
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_yk0hw"]
radius = 0.2
height = 0.89
[node name="Player" type="CharacterBody3D"]
collision_layer = 2
script = ExtResource("1_7sql3")
jump_count = 2
sprint_toggle = true
[node name="CollisionShapeStanding" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.953133, 0)
shape = SubResource("CapsuleShape3D_tv3cd")
[node name="CollisionShapeCrouching" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.536112, 0)
shape = SubResource("CapsuleShape3D_yk0hw")
disabled = true
[node name="Head" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.8, 0)
[node name="Camera3D" type="Camera3D" parent="Head"]
[node name="RayCastLook" type="RayCast3D" parent="Head"]
target_position = Vector3(0, 0, -10)
debug_shape_custom_color = Color(0.753415, 4.77457e-05, 0.578804, 1)
script = ExtResource("2_dovo2")
[node name="RayCastCrouch" type="RayCast3D" parent="."]
editor_description = "Y should be just slightly higher than the height of the standing collision shape"
target_position = Vector3(0, 1.96, 0)