diff --git a/model/MainHugues.glb.import b/model/MainHugues.glb.import new file mode 100644 index 0000000..7452c21 --- /dev/null +++ b/model/MainHugues.glb.import @@ -0,0 +1,36 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://bk711uq7krv40" +path="res://.godot/imported/MainHugues.glb-9cb9c1a8efde4e6935c54e0773df53f3.scn" + +[deps] + +source_file="res://model/MainHugues.glb" +dest_files=["res://.godot/imported/MainHugues.glb-9cb9c1a8efde4e6935c54e0773df53f3.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/model/MainHugues_Main.png b/model/MainHugues_Main.png new file mode 100644 index 0000000..59b6439 Binary files /dev/null and b/model/MainHugues_Main.png differ diff --git a/model/MainHugues_Main.png.import b/model/MainHugues_Main.png.import new file mode 100644 index 0000000..646a57f --- /dev/null +++ b/model/MainHugues_Main.png.import @@ -0,0 +1,38 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dru4vepl571yl" +path.s3tc="res://.godot/imported/MainHugues_Main.png-3da3b0d85d936e58610f73b46dfc8095.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} +generator_parameters={ +"md5": "d560b65170c874f58691e4f5dd8a3f23" +} + +[deps] + +source_file="res://model/MainHugues_Main.png" +dest_files=["res://.godot/imported/MainHugues_Main.png-3da3b0d85d936e58610f73b46dfc8095.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 diff --git a/scene/gpu_particles_3d.tscn b/scene/gpu_particles_3d.tscn index 97a2b11..28c976c 100644 --- a/scene/gpu_particles_3d.tscn +++ b/scene/gpu_particles_3d.tscn @@ -1,8 +1,8 @@ -[gd_scene load_steps=3 format=3 uid="uid://b5rkwb64wgdwf"] +[gd_scene load_steps=4 format=3 uid="uid://b5rkwb64wgdwf"] [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_wf2yo"] lifetime_randomness = 0.1 -emission_shape_scale = Vector3(0.1, 0.1, 0.1) +emission_shape_scale = Vector3(0.05, 0.05, 0.05) emission_shape = 1 emission_sphere_radius = 1.0 gravity = Vector3(0, -20, 0) @@ -10,13 +10,17 @@ turbulence_enabled = true turbulence_noise_strength = 0.1 turbulence_noise_scale = 0.1 +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_pq4g5"] +albedo_color = Color(0, 1, 1, 1) + [sub_resource type="SphereMesh" id="SphereMesh_gj8tf"] -radius = 0.05 -height = 0.1 +material = SubResource("StandardMaterial3D_pq4g5") +radius = 0.01 +height = 0.02 [node name="GPUParticles3D" type="GPUParticles3D"] emitting = false -amount = 100 +amount = 150 one_shot = true fixed_fps = 60 process_material = SubResource("ParticleProcessMaterial_wf2yo") diff --git a/scene/main.tscn b/scene/main.tscn new file mode 100644 index 0000000..aa91d56 --- /dev/null +++ b/scene/main.tscn @@ -0,0 +1,5 @@ +[gd_scene load_steps=2 format=3 uid="uid://cqla6v58rvrqd"] + +[ext_resource type="PackedScene" uid="uid://bk711uq7krv40" path="res://model/MainHugues.glb" id="1_tp7ln"] + +[node name="MainHugues" instance=ExtResource("1_tp7ln")] diff --git a/scene/player.tscn b/scene/player.tscn index ce6a71e..7b18b83 100644 --- a/scene/player.tscn +++ b/scene/player.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=9 format=3 uid="uid://c74354tlmcg6h"] +[gd_scene load_steps=10 format=3 uid="uid://c74354tlmcg6h"] [ext_resource type="Script" path="res://script/player.gd" id="1_kjuyr"] [ext_resource type="PackedScene" uid="uid://b5rkwb64wgdwf" path="res://scene/gpu_particles_3d.tscn" id="2_ctykj"] +[ext_resource type="PackedScene" uid="uid://cqla6v58rvrqd" path="res://scene/main.tscn" id="3_wfafm"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_d8bnp"] @@ -11,12 +12,108 @@ albedo_color = Color(1, 0, 1, 1) [sub_resource type="CapsuleMesh" id="CapsuleMesh_ha068"] radius = 0.1 -[sub_resource type="Animation" id="Animation_njhrs"] -resource_name = "finger" -length = 3.0 - [sub_resource type="Animation" id="Animation_1p8b7"] length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("MainHugues:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector3(0.252187, 0, 0)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("MainHugues:rotation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector3(0, 0, -1.5708)] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("GPUParticles3D:emitting") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [false] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("MainHugues:visible") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} + +[sub_resource type="Animation" id="Animation_njhrs"] +resource_name = "finger" +length = 7.0 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("MainHugues:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.5, 1, 1.26667, 1.5, 2, 5.03333, 7), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1), +"update": 0, +"values": [Vector3(0.252187, 0, 0), Vector3(0.252187, 0, -0.254602), Vector3(0.000633344, 0.311501, -0.254602), Vector3(0.000633359, 0.156883, -0.254602), Vector3(0.173339, 0.156883, -0.143999), Vector3(0.173339, 0.768297, -0.143999), Vector3(0.173339, 0.768297, -0.143999), Vector3(0.252187, 0, 0)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("MainHugues:rotation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 0.5, 1, 1.26667, 1.5, 2, 5.03333, 7), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1), +"update": 0, +"values": [Vector3(0, 0, -1.5708), Vector3(0.00877896, -1.57553, 1.5708), Vector3(0.00877896, -1.57553, 1.5708), Vector3(0.00877896, -1.57553, 1.5708), Vector3(0.00877896, -1.57553, 1.5708), Vector3(0.00877896, -2.96647, 1.5708), Vector3(0.00877896, -2.96647, 1.5708), Vector3(0, 0, -1.5708)] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("GPUParticles3D:emitting") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0, 2.03333, 7), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 1, +"values": [false, true, false] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("MainHugues:visible") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0, 0.5, 4.96667, 7), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 1, +"values": [false, true, false, false] +} [sub_resource type="AnimationLibrary" id="AnimationLibrary_jrykd"] _data = { @@ -49,9 +146,12 @@ material_override = SubResource("StandardMaterial3D_ohrfw") mesh = SubResource("CapsuleMesh_ha068") [node name="GPUParticles3D" parent="." instance=ExtResource("2_ctykj")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.424, 0) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.181584, 1.08362, -0.121582) [node name="AnimationPlayer" type="AnimationPlayer" parent="."] libraries = { "": SubResource("AnimationLibrary_jrykd") } + +[node name="MainHugues" parent="." instance=ExtResource("3_wfafm")] +transform = Transform3D(-2.18557e-09, 0.05, 0, -0.05, -2.18557e-09, 0, 0, 0, 0.05, 0.252187, 0, 0) diff --git a/script/player.gd b/script/player.gd index e5edece..6bf5e71 100644 --- a/script/player.gd +++ b/script/player.gd @@ -16,7 +16,7 @@ extends CharacterBody3D func _ready() -> void: - + time_hand = cooldown Input.mouse_mode = Input.MOUSE_MODE_CAPTURED add_to_group("player") @@ -43,7 +43,7 @@ func _physics_process(delta: float) -> void: else: vect = (checkpoint.position - position).normalized() * SPEED_PARTICULES particules.process_material.set("gravity", vect) - particules.emitting = true + anim.play("finger") var input_dir := Input.get_vector("left", "right", "up", "down")