mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 23:10:08 +01:00
- Allow placing/breaking blocks when further away (up to 5 blocks instead of 4). - Add a background to the debug display to improve readability on bright backgrounds. - Simplify coordinate display using the `%v` placeholder available in 4.3 onwards.
77 lines
2.2 KiB
Plaintext
77 lines
2.2 KiB
Plaintext
[gd_scene load_steps=10 format=3 uid="uid://1s4asqpay67m"]
|
|
|
|
[ext_resource type="Script" uid="uid://rm45k07vw817" path="res://player/player.gd" id="1"]
|
|
[ext_resource type="Texture2D" uid="uid://d3f34krqfgdjd" path="res://world/textures/texture_sheet.png" id="2"]
|
|
|
|
[sub_resource type="CylinderShape3D" id="1"]
|
|
height = 1.75
|
|
radius = 0.375
|
|
|
|
[sub_resource type="CameraAttributesPractical" id="CameraAttributesPractical_jyixh"]
|
|
|
|
[sub_resource type="AtlasTexture" id="2"]
|
|
atlas = ExtResource("2")
|
|
region = Rect2(0, 0, 64, 64)
|
|
|
|
[sub_resource type="Gradient" id="Gradient_rkbax"]
|
|
offsets = PackedFloat32Array(0.952381, 1)
|
|
colors = PackedColorArray(0, 0, 0, 0.0941176, 0, 0, 0, 1)
|
|
|
|
[sub_resource type="GradientTexture2D" id="GradientTexture2D_g1dw6"]
|
|
gradient = SubResource("Gradient_rkbax")
|
|
width = 256
|
|
height = 256
|
|
fill = 2
|
|
fill_from = Vector2(0.5, 0.5)
|
|
|
|
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_yw30f"]
|
|
transparency = 1
|
|
shading_mode = 0
|
|
albedo_texture = SubResource("GradientTexture2D_g1dw6")
|
|
uv1_scale = Vector3(3, 2, 1)
|
|
|
|
[sub_resource type="BoxMesh" id="BoxMesh_qjkh3"]
|
|
material = SubResource("StandardMaterial3D_yw30f")
|
|
size = Vector3(1.001, 1.001, 1.001)
|
|
|
|
[node name="Player" type="CharacterBody3D"]
|
|
collision_layer = 0
|
|
script = ExtResource("1")
|
|
|
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.875, 0)
|
|
shape = SubResource("1")
|
|
|
|
[node name="Head" type="Node3D" parent="."]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.6, 0)
|
|
|
|
[node name="Camera3D" type="Camera3D" parent="Head"]
|
|
attributes = SubResource("CameraAttributesPractical_jyixh")
|
|
fov = 74.0
|
|
near = 0.02
|
|
far = 1000.0
|
|
|
|
[node name="RayCast3D" type="RayCast3D" parent="Head"]
|
|
target_position = Vector3(0, 0, -5)
|
|
|
|
[node name="SelectedBlock" type="TextureRect" parent="."]
|
|
texture_filter = 1
|
|
anchors_preset = 3
|
|
anchor_left = 1.0
|
|
anchor_top = 1.0
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
offset_left = -127.0
|
|
offset_top = -127.0
|
|
offset_right = 1.0
|
|
offset_bottom = 1.0
|
|
grow_horizontal = 0
|
|
grow_vertical = 0
|
|
texture = SubResource("2")
|
|
expand_mode = 1
|
|
|
|
[node name="AimPreview" type="MeshInstance3D" parent="."]
|
|
top_level = true
|
|
visible = false
|
|
mesh = SubResource("BoxMesh_qjkh3")
|