From: Clifton Palmer Date: Sat, 3 May 2025 15:14:02 +0000 (+0300) Subject: Basic prototype movement test X-Git-Url: http://git.purplebirdman.com/frog-ninja.git/commitdiff_plain/a070d33828371b5c36b891f93bd1708f8da1b451 Basic prototype movement test --- diff --git a/Scene.gd b/Scene.gd new file mode 100644 index 0000000..a9d57e0 --- /dev/null +++ b/Scene.gd @@ -0,0 +1,12 @@ +extends Node3D +class_name Scene + + +func _input(event: InputEvent) -> void: + if event.is_action_pressed("left_click"): + Input.mouse_mode = Input.MOUSE_MODE_CAPTURED + elif event.is_action_pressed("ui_cancel"): + if Input.mouse_mode == Input.MOUSE_MODE_VISIBLE: + get_tree().quit() + else: + Input.mouse_mode = Input.MOUSE_MODE_VISIBLE diff --git a/Scene.gd.uid b/Scene.gd.uid new file mode 100644 index 0000000..9d50ef2 --- /dev/null +++ b/Scene.gd.uid @@ -0,0 +1 @@ +uid://ccournv7m7l4y diff --git a/main.gd b/main.gd new file mode 100644 index 0000000..6779aef --- /dev/null +++ b/main.gd @@ -0,0 +1,49 @@ +extends Node +class_name MainMenu + + +@export var scene: PackedScene +@export var load_scene_immediately: bool = false +@export var fullscreen: bool = false +@export var screen_size_fractional: float = 0.5 + + +func _ready() -> void: + _set_project_version() + _set_screen_size() + + if load_scene_immediately: + _load_scene() + + +func _set_project_version() -> void: + var version = ProjectSettings.get_setting("application/config/version") + %buildVersion.text = "v" + str(version) + + +func _set_screen_size() -> void: + var _screen_size: Vector2i = DisplayServer.screen_get_size() + if fullscreen: + DisplayServer.window_set_position(Vector2i.ZERO) + DisplayServer.window_set_size(_screen_size) + else: + var _win_pos = _screen_size * (1.0 - screen_size_fractional) * 0.5 + var _win_size = _screen_size * screen_size_fractional + DisplayServer.window_set_position(_win_pos) + DisplayServer.window_set_size(_win_size) + + +func _input(event: InputEvent) -> void: + if event.is_action_pressed("ui_cancel"): + get_tree().quit() + + +func _on_start_pressed() -> void: + _load_scene() + + +func _load_scene(): + if scene: + get_tree().change_scene_to_packed(scene) + else: + print_debug("No scene to change to!") diff --git a/main.gd.uid b/main.gd.uid new file mode 100644 index 0000000..0ba710b --- /dev/null +++ b/main.gd.uid @@ -0,0 +1 @@ +uid://jbyuxajvi3x1 diff --git a/main.tscn b/main.tscn new file mode 100644 index 0000000..92b1859 --- /dev/null +++ b/main.tscn @@ -0,0 +1,79 @@ +[gd_scene load_steps=3 format=3 uid="uid://xtdsp4hhl70p"] + +[ext_resource type="Script" uid="uid://jbyuxajvi3x1" path="res://main.gd" id="1_ig7tw"] +[ext_resource type="PackedScene" uid="uid://cootj2rfyviyb" path="res://test.tscn" id="2_0xm2m"] + +[node name="Main" type="Node"] +script = ExtResource("1_ig7tw") +scene = ExtResource("2_0xm2m") +load_scene_immediately = true +screen_size_fractional = 0.7 + +[node name="menu" type="Control" parent="."] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="background" type="ColorRect" parent="menu"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0.0383972, 0.0383972, 0.0383972, 1) + +[node name="start" type="MarginContainer" parent="menu"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +theme_override_constants/margin_left = 100 +theme_override_constants/margin_top = 100 +theme_override_constants/margin_right = 100 +theme_override_constants/margin_bottom = 100 + +[node name="VBoxContainer" type="VBoxContainer" parent="menu/start"] +layout_mode = 2 + +[node name="Start" type="MenuButton" parent="menu/start/VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 50 +text = "start the intro" + +[node name="MarginContainer" type="MarginContainer" parent="menu/start/VBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 3 +theme_override_constants/margin_left = 30 +theme_override_constants/margin_top = 30 +theme_override_constants/margin_right = 30 +theme_override_constants/margin_bottom = 30 + +[node name="Label" type="Label" parent="menu/start/VBoxContainer/MarginContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 30 +text = "Controls + +e - forward +d - back +s - left +f - right + +space/click - action" + +[node name="buildVersion" type="Label" parent="menu/start/VBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +text = "0.1.0" + +[connection signal="pressed" from="menu/start/VBoxContainer/Start" to="." method="_on_start_pressed"] diff --git a/model/prototype.glb b/model/prototype.glb new file mode 100644 index 0000000..a3948ab Binary files /dev/null and b/model/prototype.glb differ diff --git a/model/prototype.glb.import b/model/prototype.glb.import new file mode 100644 index 0000000..493179c --- /dev/null +++ b/model/prototype.glb.import @@ -0,0 +1,37 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://bnmnurravolxk" +path="res://.godot/imported/prototype.glb-db85703f780f506d8267f3d79de693d3.scn" + +[deps] + +source_file="res://model/prototype.glb" +dest_files=["res://.godot/imported/prototype.glb-db85703f780f506d8267f3d79de693d3.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +nodes/use_node_type_suffixes=true +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/prototype_gun.glb b/model/prototype_gun.glb new file mode 100644 index 0000000..d7fa418 Binary files /dev/null and b/model/prototype_gun.glb differ diff --git a/model/prototype_gun.glb.import b/model/prototype_gun.glb.import new file mode 100644 index 0000000..d3f6777 --- /dev/null +++ b/model/prototype_gun.glb.import @@ -0,0 +1,37 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://2c53xfad7i35" +path="res://.godot/imported/prototype_gun.glb-c8a5f74ba65f06239e92d07f6ac37956.scn" + +[deps] + +source_file="res://model/prototype_gun.glb" +dest_files=["res://.godot/imported/prototype_gun.glb-c8a5f74ba65f06239e92d07f6ac37956.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +nodes/use_node_type_suffixes=true +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/prototype_sword.glb b/model/prototype_sword.glb new file mode 100644 index 0000000..c2d05ae Binary files /dev/null and b/model/prototype_sword.glb differ diff --git a/model/prototype_sword.glb.import b/model/prototype_sword.glb.import new file mode 100644 index 0000000..809b9c6 --- /dev/null +++ b/model/prototype_sword.glb.import @@ -0,0 +1,37 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://nwqdx8lhgyk4" +path="res://.godot/imported/prototype_sword.glb-34513fffaeba95f8843ddfb27078fb04.scn" + +[deps] + +source_file="res://model/prototype_sword.glb" +dest_files=["res://.godot/imported/prototype_sword.glb-34513fffaeba95f8843ddfb27078fb04.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +nodes/use_node_type_suffixes=true +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/player/player.gd b/player/player.gd new file mode 100644 index 0000000..94283d9 --- /dev/null +++ b/player/player.gd @@ -0,0 +1,152 @@ +extends CharacterBody3D +class_name Player + + +# player settings +@export_group("Movement") +@export var walk_speed := 10.0 + +@export var air_speed := 3.0 +@export var acceleration := 50.0 +@export var rotation_speed := 10.0 +@export var idle_timeout := 5.0 +@export var hard_landing_limit := 10.0 + +@export_group("Physics") +@export var push_force := 5.0 + +@export_group("Camera") +@export_range(1.0, 10.0) var camera_distance := 2.0 +@export_range(0.0, 1.0) var mouse_sensitivity := 0.15 +@export_range(0.0, 1.0) var mouse_sensitivity_x := 1.0 +@export_range(0.0, 1.0) var mouse_sensitivity_y := 0.5 +@export_range(0.0, 10.0) var joystick_sensitivity_x := 4.0 +@export_range(0.0, 10.0) var joystick_sensitivity_y := 2.0 + + +@onready var _camera_pivot: Node3D = %camera_pivot +@onready var _camera: Camera3D = %camera +@onready var _camera_spring: SpringArm3D = %spring +@onready var _skin: AnimatedSkin = %skin + +var _last_movement_direction := rotation +var _floor_normal := Vector3.ONE +var _ground_slope_input := 0.0 +var _camera_input_direction := Vector2.ZERO + +enum {CAMERA_MOUSE_INPUT, CAMERA_JOYSTICK_INPUT} +var _camera_input_method := CAMERA_MOUSE_INPUT + +var _idle_time: float = 0.0 +var _player_speed: float = walk_speed + + +func _ready() -> void: + _camera_spring.spring_length = camera_distance + + +func _physics_process(delta: float) -> void: + _process_camera(delta) + _process_player(delta) + + +func _unhandled_input(event: InputEvent) -> void: + # If user clicks on the window, capture the mouse and direct the camera with it + if Input.get_mouse_mode() != Input.MOUSE_MODE_CAPTURED: + return + + #_camera_input_direction *= mouse_sensitivity + if event is InputEventMouseMotion: + _camera_input_method = CAMERA_MOUSE_INPUT + _camera_input_direction = event.screen_relative * mouse_sensitivity + elif event is InputEventJoypadMotion: + _camera_input_method = CAMERA_JOYSTICK_INPUT + _camera_input_direction = Input.get_vector("camera-left", "camera-right", "camera-up", "camera-down") + _camera_input_direction *= Vector2(joystick_sensitivity_x, -joystick_sensitivity_y) + + +func _input(event: InputEvent): + if event.is_action_pressed("player-dash"): + _skin.transition_dash() + + +# Get the XZ input direction based on player's input relative to the camera +func _get_player_move_direction() -> Vector3: + var input_dir := Input.get_vector("player-left", "player-right", "player-forward", "player-backward") + var forward := _camera.global_basis.z + var right := _camera.global_basis.x + var move_direction := (forward * input_dir.y + right * input_dir.x).normalized() + move_direction.y = 0 + return move_direction + + +func _process_camera(delta: float) -> void: + # vertical camera rotation + _camera_pivot.rotation.x += _camera_input_direction.y * mouse_sensitivity_y * delta + _camera_pivot.rotation.x = clamp(_camera_pivot.rotation.x, -PI / 6, PI / 3) + + # horizontal camera rotation + _camera_pivot.rotation.y -= _camera_input_direction.x * mouse_sensitivity_x * delta + + # reset mouse movement vector if mouse input + if _camera_input_method == CAMERA_MOUSE_INPUT: + _camera_input_direction = Vector2.ZERO + + # change spring length depending on player speed + _camera_spring.spring_length = lerp( + _camera_spring.spring_length, camera_distance + velocity.length() / 4, delta + ) + + +func _process_player_on_floor(delta: float): + var move_direction := _get_player_move_direction() + + # if we're not stuck, then it's okay to set the velocity + _floor_normal = get_floor_normal() + _ground_slope_input = (PI / 2) - velocity.angle_to(_floor_normal) + velocity = velocity.move_toward( + move_direction * (_player_speed + _ground_slope_input * _player_speed), + acceleration * delta + ) + var movement_speed := Vector3(velocity.x, 0, velocity.z).length() + + # also, if we're moving, we're not idle + if move_direction.length() < 0.2: + if velocity == Vector3.ZERO: + _idle_time += delta + else: + _last_movement_direction = move_direction + _idle_time = 0.0 + + # if camera is unlocked, rotate whole skin to face movement direction + var skin_target_angle := Vector3.BACK.signed_angle_to(_last_movement_direction, Vector3.UP) + _skin.global_rotation.y = lerp_angle( + _skin.global_rotation.y, + skin_target_angle, + rotation_speed * delta + ) + + # lean into player momentum just a little bit + _skin.rotation.z = lerp_angle( + _skin.rotation.z, + clamp(_last_movement_direction.signed_angle_to(velocity, Vector3.UP) * movement_speed * 0.08, -PI/4, PI/ 4), + rotation_speed * delta * 0.25 + ) + + # let skin know how fast player is moving along the ground + _skin.set_walking_speed(movement_speed) + + +func _process_player(delta: float) -> void: + if is_on_floor(): + _process_player_on_floor(delta) + + if _idle_time > idle_timeout: + _skin.transition_move() + else: + _skin.transition_move() + else: + _skin.transition_falling() + velocity += get_gravity() * air_speed * delta + + move_and_slide() diff --git a/player/player.gd.uid b/player/player.gd.uid new file mode 100644 index 0000000..3e5b223 --- /dev/null +++ b/player/player.gd.uid @@ -0,0 +1 @@ +uid://dcv34jq0jett0 diff --git a/player/player.tscn b/player/player.tscn new file mode 100644 index 0000000..5f8dc6c --- /dev/null +++ b/player/player.tscn @@ -0,0 +1,29 @@ +[gd_scene load_steps=4 format=3 uid="uid://cchu1yltrhuk3"] + +[ext_resource type="PackedScene" uid="uid://dvkx3t15l7mfb" path="res://skin/prototype_skin.tscn" id="1_4flbx"] +[ext_resource type="Script" uid="uid://dcv34jq0jett0" path="res://player/player.gd" id="1_onrkg"] + +[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_sh265"] + +[node name="Player" type="CharacterBody3D"] +collision_layer = 2 +collision_mask = 5 +script = ExtResource("1_onrkg") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0) +shape = SubResource("CapsuleShape3D_sh265") + +[node name="skin" parent="." instance=ExtResource("1_4flbx")] +unique_name_in_owner = true + +[node name="camera_pivot" type="Node3D" parent="."] +unique_name_in_owner = true + +[node name="spring" type="SpringArm3D" parent="camera_pivot"] +unique_name_in_owner = true +transform = Transform3D(-1, -2.99003e-08, 8.21505e-08, 0, 0.939693, 0.34202, -8.74228e-08, 0.34202, -0.939693, 0, 1.52762, 0) +spring_length = 3.0 + +[node name="camera" type="Camera3D" parent="camera_pivot/spring"] +unique_name_in_owner = true diff --git a/project.godot b/project.godot index ca8101f..44782f9 100644 --- a/project.godot +++ b/project.godot @@ -11,5 +11,60 @@ config_version=5 [application] config/name="Frog Ninja" +run/main_scene="uid://xtdsp4hhl70p" config/features=PackedStringArray("4.4", "Forward Plus") config/icon="res://icon.svg" + +[global_group] + +hurtbox="This hurts things" +hitbox="this can get hurt" + +[input] + +player-left={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null) +] +} +player-right={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":70,"key_label":0,"unicode":102,"location":0,"echo":false,"script":null) +] +} +player-forward={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null) +] +} +player-backward={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null) +] +} +player-slash={ +"deadzone": 0.2, +"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":1,"position":Vector2(1359, 44),"global_position":Vector2(1378, 140),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null) +] +} +player-shoot={ +"deadzone": 0.2, +"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":2,"position":Vector2(1287, 24),"global_position":Vector2(1306, 120),"factor":1.0,"button_index":2,"canceled":false,"pressed":true,"double_click":false,"script":null) +] +} +player-dash={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) +] +} +left_click={ +"deadzone": 0.2, +"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":1,"position":Vector2(923, 46),"global_position":Vector2(942, 142),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null) +] +} + +[layer_names] + +3d_physics/layer_1="static" +3d_physics/layer_2="player" +3d_physics/layer_3="enemy" diff --git a/skin/prototype_gun_skin.tscn b/skin/prototype_gun_skin.tscn new file mode 100644 index 0000000..6d58b79 --- /dev/null +++ b/skin/prototype_gun_skin.tscn @@ -0,0 +1,5 @@ +[gd_scene load_steps=2 format=3 uid="uid://bfolm8rrgm87w"] + +[ext_resource type="PackedScene" uid="uid://2c53xfad7i35" path="res://model/prototype_gun.glb" id="1_dnjpb"] + +[node name="prototype_gun" instance=ExtResource("1_dnjpb")] diff --git a/skin/prototype_skin.tscn b/skin/prototype_skin.tscn new file mode 100644 index 0000000..5195b89 --- /dev/null +++ b/skin/prototype_skin.tscn @@ -0,0 +1,391 @@ +[gd_scene load_steps=17 format=3 uid="uid://dvkx3t15l7mfb"] + +[ext_resource type="PackedScene" uid="uid://bnmnurravolxk" path="res://model/prototype.glb" id="1_jji2g"] +[ext_resource type="Script" uid="uid://cirxg6yaodoab" path="res://skin/skin.gd" id="2_bmadk"] +[ext_resource type="PackedScene" uid="uid://c465xpmcc4rh1" path="res://skin/prototype_sword_skin.tscn" id="2_s02u1"] +[ext_resource type="PackedScene" uid="uid://bfolm8rrgm87w" path="res://skin/prototype_gun_skin.tscn" id="3_bmadk"] + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_kang0"] +animation = &"attack-gunfire" + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_i12oj"] +animation = &"attack-slashing" + +[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_bmadk"] + +[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_aeac7"] + +[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_s02u1"] + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_gs4tf"] +animation = &"move-dash" + +[sub_resource type="AnimationNodeTransition" id="AnimationNodeTransition_i12oj"] +sync = true +xfade_time = 0.25 +input_0/name = "move" +input_0/auto_advance = false +input_0/break_loop_at_end = false +input_0/reset = true +input_1/name = "dash" +input_1/auto_advance = false +input_1/break_loop_at_end = false +input_1/reset = true +input_2/name = "slash" +input_2/auto_advance = false +input_2/break_loop_at_end = false +input_2/reset = true +input_3/name = "gunfire" +input_3/auto_advance = false +input_3/break_loop_at_end = false +input_3/reset = true + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_s02u1"] +animation = &"idle-default" + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_bmadk"] +animation = &"move-jog" + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_aeac7"] +animation = &"move-walk" + +[sub_resource type="AnimationNodeBlendSpace1D" id="AnimationNodeBlendSpace1D_gs4tf"] +blend_point_0/node = SubResource("AnimationNodeAnimation_s02u1") +blend_point_0/pos = 0.0 +blend_point_1/node = SubResource("AnimationNodeAnimation_bmadk") +blend_point_1/pos = 16.0 +blend_point_2/node = SubResource("AnimationNodeAnimation_aeac7") +blend_point_2/pos = 10.0 +min_space = 0.0 +max_space = 16.0 + +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_s02u1"] +graph_offset = Vector2(-497.194, 34.4427) +nodes/Animation/node = SubResource("AnimationNodeAnimation_i12oj") +nodes/Animation/position = Vector2(-80, 510) +"nodes/Animation 2/node" = SubResource("AnimationNodeAnimation_kang0") +"nodes/Animation 2/position" = Vector2(-50, 780) +nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_s02u1") +nodes/TimeScale/position = Vector2(890, 90) +"nodes/TimeScale 2/node" = SubResource("AnimationNodeTimeScale_bmadk") +"nodes/TimeScale 2/position" = Vector2(110, 500) +"nodes/TimeScale 3/node" = SubResource("AnimationNodeTimeScale_aeac7") +"nodes/TimeScale 3/position" = Vector2(140, 730) +nodes/dashing/node = SubResource("AnimationNodeAnimation_gs4tf") +nodes/dashing/position = Vector2(-150, 310) +nodes/movement/node = SubResource("AnimationNodeTransition_i12oj") +nodes/movement/position = Vector2(510, 120) +nodes/output/position = Vector2(1210, 100) +nodes/walking/node = SubResource("AnimationNodeBlendSpace1D_gs4tf") +nodes/walking/position = Vector2(-250, 100) +node_connections = [&"TimeScale", 0, &"movement", &"TimeScale 2", 0, &"Animation", &"TimeScale 3", 0, &"Animation 2", &"movement", 0, &"walking", &"movement", 1, &"dashing", &"movement", 2, &"TimeScale 2", &"movement", 3, &"TimeScale 3", &"output", 0, &"TimeScale"] + +[node name="prototype" instance=ExtResource("1_jji2g")] +script = ExtResource("2_bmadk") + +[node name="Skeleton3D" parent="." index="0"] +bones/0/position = Vector3(0.256878, 0.843901, 0.258026) +bones/0/rotation = Quaternion(0.546758, -0.629317, 0.074969, 0.547171) +bones/1/position = Vector3(-0.297376, 0.833315, -0.177307) +bones/1/rotation = Quaternion(0.409985, 0.450475, 0.412098, 0.677613) +bones/3/position = Vector3(-0.00325433, 0.970366, 0.00598553) +bones/3/rotation = Quaternion(0.0140748, -0.330495, -0.00248497, 0.943699) +bones/4/rotation = Quaternion(-0.0801557, -2.41264e-07, -4.07088e-07, 0.996782) +bones/5/rotation = Quaternion(0.094469, 0.0411533, -0.00975032, 0.994629) +bones/5/scale = Vector3(1, 1, 1) +bones/6/rotation = Quaternion(0.107191, 0.122674, -0.0113317, 0.986576) +bones/6/scale = Vector3(1, 0.999996, 1) +bones/7/rotation = Quaternion(0.227792, -0.0101386, 0.00275453, 0.973653) +bones/8/rotation = Quaternion(-0.165356, 0.179751, -0.0306637, 0.96923) +bones/9/rotation = Quaternion(-0.0496211, -0.00400065, -0.0175309, 0.998606) +bones/10/position = Vector3(-0.00325435, 0.970366, 0.00598552) +bones/10/rotation = Quaternion(0.261519, 0.851949, 0.44061, -0.107952) +bones/11/position = Vector3(-0.00325421, 0.970366, 0.00598562) +bones/11/rotation = Quaternion(-0.467279, 0.602136, 0.179732, 0.621916) +bones/12/position = Vector3(0.0706382, 0.901904, 0.0434573) +bones/12/rotation = Quaternion(0.921795, 0.0305123, 0.321639, 0.214268) +bones/12/scale = Vector3(1.01669, 0.96744, 1.01669) +bones/13/rotation = Quaternion(-1.2296e-07, -0.0245743, -4.0984e-08, 0.999698) +bones/14/rotation = Quaternion(0.175129, -0.0254096, 0.00435311, 0.984208) +bones/14/scale = Vector3(0.999989, 0.994189, 1.00639) +bones/15/rotation = Quaternion(-3.75792e-08, 0.0369812, 1.07791e-08, 0.999316) +bones/16/rotation = Quaternion(-0.413224, 0.0363462, 0.109024, 0.903349) +bones/16/scale = Vector3(0.985371, 1.00298, 1.0131) +bones/17/rotation = Quaternion(-0.0241389, 0.934344, -0.355343, -0.0122208) +bones/17/scale = Vector3(0.999462, 1.00037, 1.00017) +bones/18/position = Vector3(-0.057651, 0.904201, -0.0589328) +bones/18/rotation = Quaternion(0.938388, -0.102159, 0.328258, -0.0351791) +bones/18/scale = Vector3(1.0153, 0.970086, 1.0153) +bones/19/rotation = Quaternion(-7.33728e-10, 0.0869991, 1.2779e-08, 0.996208) +bones/20/rotation = Quaternion(0.213609, 0.0865187, -0.0183792, 0.972907) +bones/20/scale = Vector3(0.999992, 0.992285, 1.00839) +bones/21/rotation = Quaternion(-3.73188e-08, 0.0721384, -7.65122e-09, 0.997395) +bones/22/rotation = Quaternion(-0.560588, 0.0714899, -0.110115, 0.817622) +bones/22/scale = Vector3(0.988373, 0.989873, 1.0228) +bones/23/rotation = Quaternion(-0.00194637, 0.937021, -0.349248, -0.00362355) +bones/23/scale = Vector3(0.999647, 1.00025, 1.0001) +bones/24/position = Vector3(0.0522778, 1.57794, 0.162632) +bones/24/rotation = Quaternion(0.168681, -0.0968575, -0.0623047, 0.97892) +bones/25/position = Vector3(0.0554969, 1.61181, 0.175065) +bones/25/rotation = Quaternion(-0.387017, 0.00471295, -0.369487, 0.844793) +bones/26/position = Vector3(0.0739613, 1.62452, 0.155508) +bones/26/rotation = Quaternion(0.758643, -0.0404215, 0.637601, -0.12764) +bones/26/scale = Vector3(1.00001, 0.999978, 1.00001) +bones/27/scale = Vector3(0.999989, 1.00002, 0.999994) +bones/28/position = Vector3(0.0619771, 1.56043, 0.161109) +bones/28/rotation = Quaternion(0.138402, -0.395447, 0.21186, 0.882939) +bones/29/position = Vector3(-0.112546, 1.56432, 0.158827) +bones/29/rotation = Quaternion(0.15862, 0.0876257, 0.146753, 0.972433) +bones/30/position = Vector3(-0.121887, 1.59712, 0.170909) +bones/30/rotation = Quaternion(-0.393805, -0.0562875, 0.428804, 0.811096) +bones/31/position = Vector3(-0.141244, 1.60671, 0.150479) +bones/31/rotation = Quaternion(0.767361, 0.105824, -0.628122, -0.0736326) +bones/31/scale = Vector3(1.00001, 0.999994, 1) +bones/33/position = Vector3(-0.119161, 1.54547, 0.156904) +bones/33/rotation = Quaternion(0.110205, 0.384853, -0.135026, 0.906372) +bones/34/position = Vector3(-0.0269115, 1.50433, 0.259308) +bones/34/rotation = Quaternion(-0.599578, -0.0340947, 0.0260301, 0.799166) +bones/35/position = Vector3(-0.0287062, 1.51465, 0.299532) +bones/35/rotation = Quaternion(-0.749103, -0.0386615, 0.0185809, 0.661064) +bones/35/scale = Vector3(1.00001, 0.999983, 1.00001) +bones/36/rotation = Quaternion(0.172811, -6.05809e-08, 3.59375e-07, 0.984955) +bones/36/scale = Vector3(0.99999, 1.00002, 0.999994) +bones/37/position = Vector3(-0.0127844, 1.52266, 0.270168) +bones/37/rotation = Quaternion(-0.12595, 0.584667, 0.775032, 0.204025) +bones/38/position = Vector3(-0.0443478, 1.52004, 0.26943) +bones/38/rotation = Quaternion(0.0592147, 0.597654, 0.758283, -0.253595) +bones/39/position = Vector3(0.0137264, 1.57978, 0.247603) +bones/39/rotation = Quaternion(-0.0340947, 0.599578, 0.799166, -0.0260301) +bones/40/position = Vector3(-0.00865019, 1.56833, 0.263876) +bones/40/rotation = Quaternion(0.717327, 0.587935, 0.287784, -0.238652) +bones/40/scale = Vector3(0.999995, 1.00001, 0.999995) +bones/41/rotation = Quaternion(0.0748491, -0.0181048, -0.043127, 0.996097) +bones/41/scale = Vector3(1.00001, 0.999982, 1.00001) +bones/42/rotation = Quaternion(0.274347, -0.0136375, -0.129823, 0.95273) +bones/42/scale = Vector3(0.999995, 1.00001, 0.999997) +bones/43/rotation = Quaternion(0.278039, -0.00341864, 0.067147, 0.958214) +bones/43/scale = Vector3(1, 0.999998, 1) +bones/44/position = Vector3(0.0362773, 1.58194, 0.249059) +bones/44/rotation = Quaternion(-0.639293, 0.602227, 0.302652, -0.370175) +bones/44/scale = Vector3(1, 0.999997, 1) +bones/45/rotation = Quaternion(0.216098, -2.38372e-06, 7.31266e-05, 0.976372) +bones/45/scale = Vector3(0.999997, 1, 0.999998) +bones/46/rotation = Quaternion(0.356984, 0.00871236, -0.115499, 0.926902) +bones/46/scale = Vector3(0.999999, 1, 0.999997) +bones/47/rotation = Quaternion(0.0323356, 0.0279349, -0.125373, 0.991189) +bones/47/scale = Vector3(1.00001, 0.999983, 1.00001) +bones/48/position = Vector3(0.0137264, 1.57978, 0.247603) +bones/48/rotation = Quaternion(-0.0340947, 0.599579, 0.799165, -0.0260301) +bones/50/position = Vector3(-0.0788118, 1.57212, 0.245441) +bones/50/rotation = Quaternion(-0.0340947, 0.599578, 0.799166, -0.0260301) +bones/51/position = Vector3(-0.0556367, 1.56444, 0.262778) +bones/51/rotation = Quaternion(0.769885, -0.521045, -0.289714, -0.227718) +bones/51/scale = Vector3(1, 0.999997, 1) +bones/52/rotation = Quaternion(0.0748466, 0.0181067, 0.0431008, 0.996099) +bones/52/scale = Vector3(0.999999, 1, 0.999999) +bones/53/rotation = Quaternion(0.274349, 0.0136351, 0.129833, 0.952728) +bones/53/scale = Vector3(0.999999, 1, 0.999999) +bones/54/rotation = Quaternion(0.27804, 0.00341749, -0.0671438, 0.958214) +bones/54/scale = Vector3(0.999997, 1.00001, 0.999996) +bones/55/position = Vector3(-0.101454, 1.57054, 0.245841) +bones/55/rotation = Quaternion(0.580224, 0.644124, 0.346957, 0.357862) +bones/55/scale = Vector3(1.00001, 0.999987, 1.00001) +bones/56/rotation = Quaternion(0.216093, 4.47298e-06, -8.28337e-05, 0.976373) +bones/56/scale = Vector3(0.999988, 1.00002, 0.999992) +bones/57/rotation = Quaternion(0.356984, -0.0087149, 0.115506, 0.926901) +bones/57/scale = Vector3(1, 0.999998, 0.999997) +bones/58/rotation = Quaternion(0.0323454, -0.0279339, 0.125381, 0.991188) +bones/58/scale = Vector3(1, 0.999999, 1) +bones/59/position = Vector3(-0.0788118, 1.57212, 0.245441) +bones/59/rotation = Quaternion(-0.0340947, 0.599578, 0.799166, -0.0260301) +bones/61/position = Vector3(-0.024432, 1.47832, 0.245356) +bones/61/rotation = Quaternion(-0.599579, -0.0340947, 0.0260301, 0.799166) +bones/62/position = Vector3(-0.024858, 1.48664, 0.234095) +bones/62/rotation = Quaternion(-0.509158, -0.0310633, 0.029582, 0.859604) +bones/65/position = Vector3(-0.0310146, 1.57317, 0.190968) +bones/65/rotation = Quaternion(0.98765, 0.0390532, 0.0177444, 0.150693) +bones/66/position = Vector3(-0.0205739, 1.43479, 0.234457) +bones/66/rotation = Quaternion(0.318789, 0.00213084, 0.0428424, 0.946855) +bones/66/scale = Vector3(0.999995, 1.00001, 0.999996) +bones/67/scale = Vector3(1.00001, 0.999993, 1) +bones/68/position = Vector3(-0.0210126, 1.45331, 0.186081) +bones/68/rotation = Quaternion(0.822984, 0.027401, 0.0330037, 0.566442) +bones/69/position = Vector3(0.0520187, 1.58005, 0.192908) +bones/69/rotation = Quaternion(0.993665, -0.0483649, -0.0138258, -0.100494) +bones/72/position = Vector3(-0.114063, 1.5663, 0.189022) +bones/72/rotation = Quaternion(0.985697, 0.132494, 0.0286181, -0.100139) +bones/75/position = Vector3(-0.0263315, 1.49438, 0.269722) +bones/75/rotation = Quaternion(-0.441663, -0.389516, -0.462314, 0.66293) +bones/76/rotation = Quaternion(-0.15209, -0.0958223, 0.266082, 0.947041) +bones/76/scale = Vector3(0.999994, 1.00001, 0.999993) +bones/77/position = Vector3(-0.0263315, 1.49438, 0.269722) +bones/77/rotation = Quaternion(-0.48293, 0.336218, 0.505015, 0.631423) +bones/78/rotation = Quaternion(-0.152094, 0.095823, -0.266084, 0.94704) +bones/78/scale = Vector3(0.999994, 1.00001, 0.999994) +bones/79/position = Vector3(-0.0250846, 1.48152, 0.261943) +bones/79/rotation = Quaternion(-0.382914, -0.373475, -0.383459, 0.752896) +bones/79/scale = Vector3(1, 0.999999, 1) +bones/80/rotation = Quaternion(-0.00824502, 0.0772326, 0.0389061, 0.99622) +bones/80/scale = Vector3(1, 0.999999, 1) +bones/81/position = Vector3(-0.0250846, 1.48152, 0.261943) +bones/81/rotation = Quaternion(-0.421241, 0.322986, 0.43524, 0.727188) +bones/81/scale = Vector3(0.999996, 1.00001, 0.999996) +bones/82/rotation = Quaternion(-0.00825141, -0.0772324, -0.0389073, 0.99622) +bones/82/scale = Vector3(1.00001, 0.999987, 1.00001) +bones/83/position = Vector3(0.0377778, 1.58792, 0.25258) +bones/83/rotation = Quaternion(0.152774, 0.47694, 0.649033, 0.572665) +bones/83/scale = Vector3(0.999994, 1.00001, 0.999994) +bones/84/rotation = Quaternion(-0.223178, 5.86239e-06, 0.0152086, 0.974659) +bones/84/scale = Vector3(1.00001, 0.999993, 1) +bones/85/rotation = Quaternion(-0.299458, -3.83782e-06, -0.0939993, 0.949468) +bones/86/scale = Vector3(0.999999, 1, 0.999999) +bones/87/position = Vector3(-0.0127831, 1.57363, 0.263456) +bones/87/rotation = Quaternion(-0.386223, 0.0709579, 0.918072, 0.0542209) +bones/87/scale = Vector3(1, 0.999989, 1) +bones/88/scale = Vector3(0.999997, 1.00001, 0.999997) +bones/89/position = Vector3(-0.104078, 1.57617, 0.249265) +bones/89/rotation = Quaternion(0.206666, -0.475906, -0.595862, 0.612985) +bones/89/scale = Vector3(0.999998, 1, 0.999998) +bones/90/rotation = Quaternion(-0.223161, 1.53166e-06, -0.0151752, 0.974664) +bones/90/scale = Vector3(1, 0.999999, 1) +bones/91/rotation = Quaternion(-0.29947, -3.38501e-06, 0.0939802, 0.949466) +bones/92/rotation = Quaternion(-0.172941, 1.6437e-06, -0.173091, 0.969603) +bones/92/scale = Vector3(1, 0.999994, 1) +bones/93/position = Vector3(-0.0524167, 1.57035, 0.26253) +bones/93/rotation = Quaternion(0.357576, 0.103816, 0.919213, -0.1281) +bones/93/scale = Vector3(0.999998, 1, 0.999998) +bones/94/scale = Vector3(1, 0.999989, 1.00001) +bones/95/position = Vector3(0.0440267, 1.5829, 0.223274) +bones/95/rotation = Quaternion(0.486118, -0.282634, -0.102292, 0.820575) +bones/96/position = Vector3(0.0401625, 1.60121, 0.2542) +bones/96/rotation = Quaternion(0.673804, -0.396465, 0.180431, 0.596865) +bones/98/position = Vector3(-0.0148079, 1.58654, 0.281184) +bones/98/rotation = Quaternion(0.758909, -0.408087, 0.493587, 0.117877) +bones/99/position = Vector3(-0.108052, 1.57031, 0.21972) +bones/99/rotation = Quaternion(0.458634, 0.30259, 0.180922, 0.815697) +bones/100/position = Vector3(-0.108688, 1.58888, 0.250722) +bones/100/rotation = Quaternion(0.642823, 0.436692, -0.114846, 0.61878) +bones/102/position = Vector3(-0.0533655, 1.58335, 0.280283) +bones/102/rotation = Quaternion(0.733944, 0.466443, -0.464379, 0.167659) +bones/103/position = Vector3(0.00572706, 1.49675, 0.25014) +bones/103/rotation = Quaternion(-0.360938, -0.28408, -0.316891, 0.829821) +bones/105/position = Vector3(-0.0573998, 1.49152, 0.248665) +bones/105/rotation = Quaternion(-0.390419, 0.233943, 0.375773, 0.807241) +bones/107/position = Vector3(0.0440267, 1.5829, 0.223274) +bones/107/rotation = Quaternion(0.816763, -0.318711, -0.45418, 0.158249) +bones/109/position = Vector3(-0.108052, 1.57031, 0.21972) +bones/109/rotation = Quaternion(0.776893, 0.381229, 0.484577, 0.127621) +bones/111/position = Vector3(-0.0233564, 1.63996, 0.276035) +bones/111/rotation = Quaternion(0.704616, 0.0895055, 0.703573, -0.0221428) +bones/112/position = Vector3(0.00411968, 1.65055, 0.264943) +bones/112/rotation = Quaternion(0.781134, 0.161355, 0.603034, -0.0120263) +bones/113/position = Vector3(0.0259259, 1.65486, 0.244248) +bones/113/rotation = Quaternion(0.918916, 0.151641, 0.362334, 0.0362254) +bones/114/position = Vector3(-0.0534851, 1.63747, 0.275331) +bones/114/rotation = Quaternion(0.725785, -0.0305373, -0.686407, 0.0338925) +bones/115/position = Vector3(-0.081783, 1.64344, 0.262936) +bones/115/rotation = Quaternion(0.805608, -0.0960455, -0.583622, 0.0340056) +bones/116/position = Vector3(-0.103018, 1.64419, 0.241235) +bones/116/rotation = Quaternion(0.936479, -0.0761256, -0.336619, 0.0624508) +bones/117/position = Vector3(-0.0328069, 1.5709, 0.275706) +bones/117/rotation = Quaternion(0.98201, 0.0384326, 0.0190505, 0.183892) +bones/118/scale = Vector3(0.999997, 1.00001, 0.999997) +bones/119/position = Vector3(-0.0282833, 1.51626, 0.275722) +bones/119/rotation = Quaternion(0.984921, 0.0426519, 0.00456037, -0.167603) +bones/119/scale = Vector3(1, 0.999997, 1) +bones/120/position = Vector3(0.0412091, 1.64794, 0.210066) +bones/120/rotation = Quaternion(0.989486, 0.0770902, -1.68663e-05, -0.122368) +bones/121/position = Vector3(-0.115353, 1.63498, 0.206408) +bones/121/rotation = Quaternion(0.992204, 0.00766468, 0.0129585, -0.123713) +bones/122/position = Vector3(0.0427734, 1.37321, 0.0432801) +bones/122/rotation = Quaternion(-0.36216, -0.393026, -0.625511, 0.568425) +bones/123/position = Vector3(0.150674, 1.3684, 0.0519462) +bones/123/rotation = Quaternion(0.917877, 0.15788, 0.36404, 0.00708953) +bones/123/scale = Vector3(1.03797, 0.928178, 1.03797) +bones/124/rotation = Quaternion(2.39953e-08, -0.101141, -4.83e-08, 0.994872) +bones/125/rotation = Quaternion(-0.206807, -0.100215, -0.0194682, 0.973041) +bones/125/scale = Vector3(0.999856, 0.983689, 1.02023) +bones/126/rotation = Quaternion(3.20842e-08, 0.0979968, 9.11706e-09, 0.995187) +bones/127/rotation = Quaternion(-0.10666, 0.0973194, -0.158658, 0.976719) +bones/127/scale = Vector3(0.97634, 1.06203, 0.967389) +bones/128/rotation = Quaternion(-0.0708407, 0.705237, -0.0160981, 0.70524) +bones/129/rotation = Quaternion(-0.154627, -0.00639994, 0.00459388, 0.987942) +bones/130/rotation = Quaternion(-4.31224e-06, 8.13943e-08, 6.78632e-05, 1) +bones/131/rotation = Quaternion(-0.173907, 0.094276, 0.294511, 0.93495) +bones/132/rotation = Quaternion(0.00898102, 0.0261915, -0.00892476, 0.999577) +bones/133/rotation = Quaternion(0.00626499, 6.74476e-08, -1.43925e-05, 0.99998) +bones/135/rotation = Quaternion(-0.0431512, 0.69872, 0.147342, 0.698726) +bones/136/rotation = Quaternion(-0.200112, 0.00215664, -0.0146126, 0.979662) +bones/137/rotation = Quaternion(4.65474e-06, -7.81623e-08, -2.01332e-05, 1) +bones/139/rotation = Quaternion(-0.115894, 0.67471, 0.275872, 0.674707) +bones/140/rotation = Quaternion(-0.284925, -0.0162799, -0.0300929, 0.957939) +bones/141/rotation = Quaternion(4.3083e-06, -3.352e-08, -1.93224e-06, 1) +bones/143/rotation = Quaternion(-0.112884, 0.666554, 0.315969, 0.665678) +bones/144/rotation = Quaternion(-0.345108, -0.00763498, -0.0566091, 0.936823) +bones/145/rotation = Quaternion(-7.65809e-06, 2.29663e-08, 6.55561e-05, 1) +bones/147/position = Vector3(-0.0432091, 1.37486, 0.0122993) +bones/147/rotation = Quaternion(-0.532369, 0.207071, 0.515342, 0.638849) +bones/148/position = Vector3(-0.13849, 1.36429, -0.0382738) +bones/148/rotation = Quaternion(0.95761, -0.130134, 0.0830815, -0.243197) +bones/148/scale = Vector3(1.02805, 0.946171, 1.02805) +bones/149/rotation = Quaternion(1.69235e-07, 0.0784896, 1.1061e-07, 0.996915) +bones/149/scale = Vector3(1, 1, 1) +bones/150/rotation = Quaternion(-0.206246, 0.0779674, 0.015437, 0.975267) +bones/150/scale = Vector3(0.999856, 0.987811, 1.01438) +bones/151/rotation = Quaternion(3.52022e-08, -0.022448, -2.24783e-07, 0.999748) +bones/152/rotation = Quaternion(-0.169745, -0.0223822, -0.127626, 0.976933) +bones/152/scale = Vector3(0.977931, 1.04278, 0.982625) +bones/153/rotation = Quaternion(-0.0264198, -0.706361, -0.0375105, 0.706364) +bones/154/rotation = Quaternion(-0.165204, 0.0105938, -0.00624617, 0.986183) +bones/155/rotation = Quaternion(8.39836e-07, -2.08393e-07, -6.54599e-05, 1) +bones/156/rotation = Quaternion(-0.241798, -0.0492635, -0.185496, 0.951156) +bones/157/rotation = Quaternion(0.197713, 0.0812624, -0.0213483, 0.976653) +bones/158/rotation = Quaternion(0.00626376, -7.70711e-08, 1.34285e-05, 0.99998) +bones/160/rotation = Quaternion(-0.0615454, -0.702516, -0.0956414, 0.702521) +bones/161/rotation = Quaternion(-0.276936, 0.00972201, 0.0203465, 0.960624) +bones/162/rotation = Quaternion(6.46779e-06, 1.28029e-07, 1.90929e-05, 1) +bones/164/rotation = Quaternion(-0.0879215, -0.692117, -0.184984, 0.692116) +bones/165/rotation = Quaternion(-0.327174, -0.0100698, 0.0317775, 0.944376) +bones/166/rotation = Quaternion(4.68059e-06, -2.29112e-07, 1.73853e-06, 1) +bones/168/rotation = Quaternion(-0.0816415, -0.688954, -0.211769, 0.688354) +bones/169/rotation = Quaternion(-0.356385, -0.0197772, 0.0652451, 0.931848) +bones/170/rotation = Quaternion(-9.53796e-06, -2.47026e-08, -6.50589e-05, 1) +bones/172/position = Vector3(0.0698903, 1.25705, 0.0832586) +bones/172/rotation = Quaternion(-0.138466, 0.542608, 0.822148, 0.102359) +bones/173/position = Vector3(-0.0935538, 1.26019, 0.0243951) +bones/173/rotation = Quaternion(-0.138466, 0.542608, 0.822148, 0.102359) + +[node name="weapon_L" type="BoneAttachment3D" parent="." index="2"] +unique_name_in_owner = true +transform = Transform3D(0.19668, -0.770209, -0.606708, -0.606126, 0.390871, -0.692698, 0.770667, 0.503981, -0.389968, 0.256878, 0.843901, 0.258026) +bone_name = "weapon.L" +bone_idx = 0 +use_external_skeleton = true +external_skeleton = NodePath("../Skeleton3D") + +[node name="prototype_gun" parent="weapon_L" index="0" instance=ExtResource("3_bmadk")] +transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0) + +[node name="weapon_R" type="BoneAttachment3D" parent="." index="3"] +unique_name_in_owner = true +transform = Transform3D(0.254495, -0.189111, 0.948404, 0.927862, 0.324174, -0.184343, -0.272587, 0.926902, 0.25797, -0.297376, 0.833315, -0.177307) +bone_name = "weapon.R" +bone_idx = 1 +use_external_skeleton = true +external_skeleton = NodePath("../Skeleton3D") + +[node name="prototype_sword" parent="weapon_R" index="0" instance=ExtResource("2_s02u1")] +transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0) + +[node name="AnimationTree" type="AnimationTree" parent="." index="4"] +unique_name_in_owner = true +root_node = NodePath("%AnimationTree/..") +tree_root = SubResource("AnimationNodeBlendTree_s02u1") +anim_player = NodePath("../AnimationPlayer") +parameters/TimeScale/scale = 1.5 +"parameters/TimeScale 2/scale" = 1.5 +"parameters/TimeScale 3/scale" = false +parameters/movement/current_state = "move" +parameters/movement/transition_request = "" +parameters/movement/current_index = 0 +parameters/walking/blend_position = 0.0 diff --git a/skin/prototype_sword_skin.tscn b/skin/prototype_sword_skin.tscn new file mode 100644 index 0000000..c600069 --- /dev/null +++ b/skin/prototype_sword_skin.tscn @@ -0,0 +1,17 @@ +[gd_scene load_steps=3 format=3 uid="uid://c465xpmcc4rh1"] + +[ext_resource type="PackedScene" uid="uid://nwqdx8lhgyk4" path="res://model/prototype_sword.glb" id="1_sm572"] + +[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_7a313"] +radius = 0.114308 +height = 1.12802 + +[node name="prototype_sword" instance=ExtResource("1_sm572")] + +[node name="Area3D" type="Area3D" parent="." index="1" groups=["hurtbox"]] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.720478) + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D" index="0"] +transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0) +shape = SubResource("CapsuleShape3D_7a313") +debug_color = Color(1, 0, 0.25, 1) diff --git a/skin/skin.gd b/skin/skin.gd new file mode 100644 index 0000000..913bd58 --- /dev/null +++ b/skin/skin.gd @@ -0,0 +1,30 @@ +extends Node3D +class_name AnimatedSkin + + +@onready var _tree: AnimationTree = %AnimationTree + + +func set_walking_speed(s: float): + _tree.set("parameters/walking/blend_position", s) + + +func transition_move(): + _tree.set("parameters/movement/transition_request", "move") + + +func transition_falling(): + # TODO: falling state + _tree.set("parameters/movement/transition_request", "move") + + +func transition_dash(): + _tree.set("parameters/movement/transition_request", "dash") + + +func transition_slash(): + _tree.set("parameters/movement/transition_request", "slash") + + +func transition_gunfire(): + _tree.set("parameters/movement/transition_request", "gunfire") diff --git a/skin/skin.gd.uid b/skin/skin.gd.uid new file mode 100644 index 0000000..d26f010 --- /dev/null +++ b/skin/skin.gd.uid @@ -0,0 +1 @@ +uid://cirxg6yaodoab diff --git a/test.tscn b/test.tscn new file mode 100644 index 0000000..272208c --- /dev/null +++ b/test.tscn @@ -0,0 +1,51 @@ +[gd_scene load_steps=10 format=3 uid="uid://cootj2rfyviyb"] + +[ext_resource type="Script" uid="uid://ccournv7m7l4y" path="res://Scene.gd" id="1_8uh7m"] +[ext_resource type="PackedScene" uid="uid://cchu1yltrhuk3" path="res://player/player.tscn" id="1_37kl0"] +[ext_resource type="Texture2D" uid="uid://c8cfruu4iw5at" path="res://texture/grid.png" id="2_6uqi0"] + +[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_37kl0"] +sky_horizon_color = Color(0.662243, 0.671743, 0.686743, 1) +ground_horizon_color = Color(0.662243, 0.671743, 0.686743, 1) + +[sub_resource type="Sky" id="Sky_8uh7m"] +sky_material = SubResource("ProceduralSkyMaterial_37kl0") + +[sub_resource type="Environment" id="Environment_6uqi0"] +background_mode = 2 +sky = SubResource("Sky_8uh7m") +tonemap_mode = 2 +glow_enabled = true + +[sub_resource type="PlaneMesh" id="PlaneMesh_mf4mk"] +size = Vector2(222, 222) + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_37kl0"] +albedo_color = Color(0.46, 0.46, 0.46, 1) +albedo_texture = ExtResource("2_6uqi0") +uv1_scale = Vector3(60, 60, 60) +uv1_world_triplanar = true + +[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_37kl0"] +data = PackedVector3Array(111, 0, 111, -111, 0, 111, 111, 0, -111, -111, 0, 111, -111, 0, -111, 111, 0, -111) + +[node name="Test" type="Node3D"] +script = ExtResource("1_8uh7m") + +[node name="WorldEnvironment" type="WorldEnvironment" parent="."] +environment = SubResource("Environment_6uqi0") + +[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] +transform = Transform3D(-0.866023, -0.433016, 0.250001, 0, 0.499998, 0.866027, -0.500003, 0.749999, -0.43301, 0, 0, 0) +shadow_enabled = true + +[node name="MeshInstance3D" type="MeshInstance3D" parent="."] +mesh = SubResource("PlaneMesh_mf4mk") +surface_material_override/0 = SubResource("StandardMaterial3D_37kl0") + +[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D"] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D/StaticBody3D"] +shape = SubResource("ConcavePolygonShape3D_37kl0") + +[node name="Player" parent="." instance=ExtResource("1_37kl0")] diff --git a/texture/grid.png b/texture/grid.png new file mode 100644 index 0000000..f7cc6f2 Binary files /dev/null and b/texture/grid.png differ diff --git a/texture/grid.png.import b/texture/grid.png.import new file mode 100644 index 0000000..3a38345 --- /dev/null +++ b/texture/grid.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c8cfruu4iw5at" +path.s3tc="res://.godot/imported/grid.png-5513dd1f50ff77fc07ae26a41a397aa7.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://texture/grid.png" +dest_files=["res://.godot/imported/grid.png-5513dd1f50ff77fc07ae26a41a397aa7.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