fps sample setup
This commit is contained in:
20
scenes/game.tscn
Normal file
20
scenes/game.tscn
Normal file
@@ -0,0 +1,20 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://c2kjfysadph28"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bsd3o6sy0cdc5" path="res://icon.svg" id="1_uwrxv"]
|
||||
[ext_resource type="PackedScene" uid="uid://dsgumv1053wb2" path="res://scenes/player.tscn" id="2_lnu2h"]
|
||||
[ext_resource type="PackedScene" uid="uid://dfbqg6cxhbpng" path="res://scenes/ground.tscn" id="3_lbhrr"]
|
||||
|
||||
[node name="Game" type="Node3D"]
|
||||
|
||||
[node name="Godot" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -2.16255)
|
||||
texture = ExtResource("1_uwrxv")
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("2_lnu2h")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.73814, 0)
|
||||
|
||||
[node name="Ground" parent="." instance=ExtResource("3_lbhrr")]
|
||||
transform = Transform3D(100, 0, 0, 0, 100, 0, 0, 0, 100, 0, 0, 0)
|
||||
|
||||
[node name="Sun" type="DirectionalLight3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 7.72306, 0)
|
||||
18
scenes/ground.tscn
Normal file
18
scenes/ground.tscn
Normal file
@@ -0,0 +1,18 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://dfbqg6cxhbpng"]
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_7ylpw"]
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_7ylpw"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_pybca"]
|
||||
size = Vector3(2, 0.2, 2)
|
||||
|
||||
[node name="Ground" type="MeshInstance3D"]
|
||||
mesh = SubResource("PlaneMesh_7ylpw")
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="."]
|
||||
physics_material_override = SubResource("PhysicsMaterial_7ylpw")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.099587, 0)
|
||||
shape = SubResource("BoxShape3D_pybca")
|
||||
21
scenes/player.tscn
Normal file
21
scenes/player.tscn
Normal file
@@ -0,0 +1,21 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://dsgumv1053wb2"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ccj8w85qobhpl" path="res://scripts/player.gd" id="1_3vyb7"]
|
||||
[ext_resource type="Script" uid="uid://bs7pcycdeiwqx" path="res://scripts/player_camera.gd" id="2_g2els"]
|
||||
|
||||
[sub_resource type="CapsuleMesh" id="CapsuleMesh_u8vuu"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_u8vuu"]
|
||||
|
||||
[node name="Player" type="CharacterBody3D"]
|
||||
script = ExtResource("1_3vyb7")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
mesh = SubResource("CapsuleMesh_u8vuu")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("CapsuleShape3D_u8vuu")
|
||||
|
||||
[node name="Camera" type="Camera3D" parent="."]
|
||||
current = true
|
||||
script = ExtResource("2_g2els")
|
||||
Reference in New Issue
Block a user