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.
 

45 lines
1.7 KiB

[gd_scene load_steps=6 format=3 uid="uid://cggiju8k3bkoc"]
[ext_resource type="Script" uid="uid://b6xiwiwwbdapd" path="res://scenes/player/player.gd" id="1_rp718"]
[ext_resource type="Script" uid="uid://bruuttf8j7wet" path="res://scenes/player/ray_cast_3d.gd" id="2_dovo2"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_dovo2"]
radius = 0.47
height = 1.95
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_gmlin"]
radius = 0.2
height = 0.89
[sub_resource type="CapsuleMesh" id="CapsuleMesh_gmlin"]
[node name="Player" type="CharacterBody3D"]
collision_layer = 2
script = ExtResource("1_rp718")
[node name="CollisionShapeStanding" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.953133, 0)
shape = SubResource("CapsuleShape3D_dovo2")
[node name="CollisionShapeCrouching" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.536112, 0)
shape = SubResource("CapsuleShape3D_gmlin")
disabled = true
[node name="MeshInstance" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.953133, 0)
mesh = SubResource("CapsuleMesh_gmlin")
[node name="Camera" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.8, 0)
[node name="RayCastLook" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.8, 0)
target_position = Vector3(0, 0, -5)
debug_shape_custom_color = Color(1, 0, 0, 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)
debug_shape_custom_color = Color(1, 0, 0, 1)