Initial commit
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://rd48gl8k5x34"]
|
||||
|
||||
[ext_resource type="Script" path="res://Game.gd" id="1_7jqda"]
|
||||
[ext_resource type="PackedScene" uid="uid://b1nm5h3yccr16" path="res://scenes/World.tscn" id="2_voimb"]
|
||||
|
||||
[sub_resource type="World3D" id="World3D_5g233"]
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_2lmj8"]
|
||||
viewport_path = NodePath("Viewport")
|
||||
|
||||
[node name="Game" type="Node"]
|
||||
script = ExtResource("1_7jqda")
|
||||
|
||||
[node name="Viewport" type="SubViewport" parent="."]
|
||||
own_world_3d = true
|
||||
world_3d = SubResource("World3D_5g233")
|
||||
size = Vector2i(256, 256)
|
||||
|
||||
[node name="World" parent="Viewport" instance=ExtResource("2_voimb")]
|
||||
|
||||
[node name="Panel" type="Panel" parent="."]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 6
|
||||
size_flags_vertical = 6
|
||||
|
||||
[node name="WorldView" type="TextureRect" parent="Panel"]
|
||||
texture_filter = 1
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
texture = SubResource("ViewportTexture_2lmj8")
|
||||
stretch_mode = 6
|
||||
@@ -0,0 +1,17 @@
|
||||
extends Node3D
|
||||
|
||||
@onready var player1: CharacterBody3D = $Player1
|
||||
@onready var camera: Camera3D = $Camera3D
|
||||
|
||||
var camera_offset: Vector3;
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
camera_offset = camera.global_position - player1.global_position
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
camera.global_position = player1.global_position + camera_offset
|
||||
pass
|
||||
@@ -0,0 +1,82 @@
|
||||
[gd_scene load_steps=11 format=3 uid="uid://b1nm5h3yccr16"]
|
||||
|
||||
[ext_resource type="Script" path="res://entities/Player.gd" id="1_ca7jo"]
|
||||
[ext_resource type="Script" path="res://scenes/World.gd" id="1_gtcjp"]
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_wonuc"]
|
||||
noise_type = 0
|
||||
frequency = 0.014
|
||||
fractal_lacunarity = 3.0
|
||||
|
||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_iklfu"]
|
||||
width = 32
|
||||
height = 32
|
||||
seamless = true
|
||||
seamless_blend_skirt = 0.857
|
||||
normalize = false
|
||||
noise = SubResource("FastNoiseLite_wonuc")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_b5tqf"]
|
||||
albedo_color = Color(0.113725, 0.431373, 0.266667, 0.933333)
|
||||
albedo_texture = SubResource("NoiseTexture2D_iklfu")
|
||||
uv1_triplanar = true
|
||||
texture_filter = 0
|
||||
|
||||
[sub_resource type="CylinderMesh" id="CylinderMesh_a3rev"]
|
||||
material = SubResource("StandardMaterial3D_b5tqf")
|
||||
top_radius = 20.0
|
||||
bottom_radius = 20.0
|
||||
height = 0.2
|
||||
radial_segments = 8
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_ar5d4"]
|
||||
height = 0.2
|
||||
radius = 20.0
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_yle83"]
|
||||
size = Vector3(0.24, 0.75, 0.24)
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_rwgp3"]
|
||||
height = 0.75
|
||||
radius = 0.15
|
||||
|
||||
[sub_resource type="Environment" id="Environment_f3jci"]
|
||||
ambient_light_source = 3
|
||||
ambient_light_color = Color(0.521569, 0.521569, 0.521569, 1)
|
||||
ambient_light_energy = 2.64
|
||||
|
||||
[node name="World" type="Node3D"]
|
||||
script = ExtResource("1_gtcjp")
|
||||
|
||||
[node name="Platform" type="StaticBody3D" parent="."]
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="Platform"]
|
||||
mesh = SubResource("CylinderMesh_a3rev")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Platform"]
|
||||
shape = SubResource("CylinderShape3D_ar5d4")
|
||||
|
||||
[node name="Player1" type="CharacterBody3D" parent="."]
|
||||
script = ExtResource("1_ca7jo")
|
||||
move_right_action = "move_right_p1"
|
||||
move_left_action = "move_left_p1"
|
||||
move_down_action = "move_down_p1"
|
||||
move_up_action = "move_up_p1"
|
||||
|
||||
[node name="Geometry" type="MeshInstance3D" parent="Player1"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.472544, 0)
|
||||
mesh = SubResource("BoxMesh_yle83")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Player1"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.496337, 0)
|
||||
shape = SubResource("CylinderShape3D_rwgp3")
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = SubResource("Environment_f3jci")
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||
transform = Transform3D(-4.37114e-08, -0.528438, 0.848972, 0, 0.848972, 0.528438, -1, 2.30988e-08, -3.71097e-08, 0.936448, 2.01321, 1.19116)
|
||||
shadow_enabled = true
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.305147, 0.952305, 0, -0.952305, 0.305147, -4.26326e-13, 4.70264, 1.09419)
|
||||
Reference in New Issue
Block a user