floor
This commit is contained in:
BIN
model/Floor_GrassTexture.png
Normal file
BIN
model/Floor_GrassTexture.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 189 KiB |
35
model/Floor_GrassTexture.png.import
Normal file
35
model/Floor_GrassTexture.png.import
Normal file
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dqae1tksey0vm"
|
||||
path.s3tc="res://.godot/imported/Floor_GrassTexture.png-d7b2a1134a7418f22ea04c561f114707.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://model/Floor_GrassTexture.png"
|
||||
dest_files=["res://.godot/imported/Floor_GrassTexture.png-d7b2a1134a7418f22ea04c561f114707.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
@@ -28,6 +28,7 @@ _data = {
|
||||
script = ExtResource("1_kjuyr")
|
||||
SENSI = 0.002
|
||||
SPEED_PARTICULES = 50.0
|
||||
cooldown = 4.0
|
||||
head = NodePath("head")
|
||||
anim = NodePath("AnimationPlayer")
|
||||
particules = NodePath("GPUParticles3D")
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://brc445tt624lb"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://pr42rnokdw6w" path="res://model/icon.svg" id="1_hg70h"]
|
||||
[ext_resource type="PackedScene" uid="uid://c74354tlmcg6h" path="res://scene/player.tscn" id="1_ka8xa"]
|
||||
[ext_resource type="Texture2D" uid="uid://dqae1tksey0vm" path="res://model/Floor_GrassTexture.png" id="1_odesb"]
|
||||
[ext_resource type="PackedScene" uid="uid://du08nv2jrl6vr" path="res://scene/check_point.tscn" id="4_yoxfn"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_5mtg0"]
|
||||
albedo_texture = ExtResource("1_hg70h")
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_b2syh"]
|
||||
albedo_texture = ExtResource("1_odesb")
|
||||
uv1_scale = Vector3(100, 100, 100)
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_2hvdi"]
|
||||
size = Vector2(500, 500)
|
||||
@@ -26,12 +27,12 @@ sky = SubResource("Sky_hj0r3")
|
||||
ambient_light_source = 3
|
||||
ambient_light_color = Color(0.371645, 0.450792, 0.92621, 1)
|
||||
volumetric_fog_enabled = true
|
||||
volumetric_fog_density = 0.1
|
||||
volumetric_fog_density = 0.2
|
||||
|
||||
[node name="walk_zone" type="Node3D"]
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
material_override = SubResource("StandardMaterial3D_5mtg0")
|
||||
material_override = SubResource("StandardMaterial3D_b2syh")
|
||||
mesh = SubResource("PlaneMesh_2hvdi")
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D"]
|
||||
|
||||
@@ -5,12 +5,15 @@ extends CharacterBody3D
|
||||
@export var SENSI : float = 0.005
|
||||
@export var SPEED_PARTICULES: float = 1;
|
||||
@export var checkpoint:Node3D = null
|
||||
@export var cooldown: float = 1
|
||||
|
||||
@export_group("Children")
|
||||
@export var head: Node3D
|
||||
@export var anim: AnimationPlayer
|
||||
@export var particules: GPUParticles3D
|
||||
|
||||
@export var time_hand: float= 0
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
|
||||
@@ -24,7 +27,7 @@ func _input(event: InputEvent) -> void:
|
||||
head.rotation.x = clamp(head.rotation.x, -PI/2, PI/2)
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
|
||||
time_hand += delta
|
||||
# Add the gravity.
|
||||
if not is_on_floor():
|
||||
if velocity.y < 0:
|
||||
@@ -32,7 +35,8 @@ func _physics_process(delta: float) -> void:
|
||||
else:
|
||||
velocity += get_gravity() * delta * 3
|
||||
|
||||
if (Input.is_action_just_pressed("interact")):
|
||||
if (Input.is_action_just_pressed("interact") and time_hand >= cooldown):
|
||||
time_hand = 0
|
||||
var vect
|
||||
if(checkpoint == null):
|
||||
vect = Vector3.DOWN * SPEED_PARTICULES
|
||||
|
||||
Reference in New Issue
Block a user