From fd8ece016f39fb24a4f0935aa76d8139ca86b508 Mon Sep 17 00:00:00 2001 From: hiina Date: Sun, 9 Feb 2025 23:38:24 -0700 Subject: [PATCH] add useful plugins --- addons/debug_camera/plugin.cfg | 7 ++ .../debug_camera/scripts/DebugCamAutoload.gd | 23 +++++ addons/debug_camera/scripts/DebugCamera2D.gd | 61 ++++++++++++ addons/debug_camera/scripts/DebugCamera3D.gd | 61 ++++++++++++ addons/debug_camera/scripts/plugin.gd | 12 +++ addons/godot-xr-toggle/LICENSE | 21 ++++ addons/godot-xr-toggle/export_plugin.gd | 71 ++++++++++++++ addons/godot-xr-toggle/plugin.cfg | 7 ++ addons/godot-xr-toggle/plugin.gd | 97 +++++++++++++++++++ .../holodeck_map_shader_with_alpha.tres | 6 +- project.godot | 5 +- scenes/world_grab_demo/world_grab_demo.tscn | 63 ++++++------ 12 files changed, 396 insertions(+), 38 deletions(-) create mode 100644 addons/debug_camera/plugin.cfg create mode 100644 addons/debug_camera/scripts/DebugCamAutoload.gd create mode 100644 addons/debug_camera/scripts/DebugCamera2D.gd create mode 100644 addons/debug_camera/scripts/DebugCamera3D.gd create mode 100644 addons/debug_camera/scripts/plugin.gd create mode 100644 addons/godot-xr-toggle/LICENSE create mode 100644 addons/godot-xr-toggle/export_plugin.gd create mode 100644 addons/godot-xr-toggle/plugin.cfg create mode 100644 addons/godot-xr-toggle/plugin.gd diff --git a/addons/debug_camera/plugin.cfg b/addons/debug_camera/plugin.cfg new file mode 100644 index 0000000..4272759 --- /dev/null +++ b/addons/debug_camera/plugin.cfg @@ -0,0 +1,7 @@ +[plugin] + +name="Debug Camera" +description="A debug camera for Godot 4" +author="Kcfresh53" +version="1.2" +script="scripts/plugin.gd" diff --git a/addons/debug_camera/scripts/DebugCamAutoload.gd b/addons/debug_camera/scripts/DebugCamAutoload.gd new file mode 100644 index 0000000..b3ea3ba --- /dev/null +++ b/addons/debug_camera/scripts/DebugCamAutoload.gd @@ -0,0 +1,23 @@ +extends Node + +var debug_cam_2d = preload("res://addons/debug_camera/scripts/DebugCamera2D.gd") +var debug_cam_3d = preload("res://addons/debug_camera/scripts/DebugCamera3D.gd") + + +func _ready() -> void: + var cam_2d := debug_cam_2d.new() + var cam_3d := debug_cam_3d.new() + + get_tree().current_scene.tree_exited.connect(_new_scene) + + if get_viewport().get_camera_2d() != null: + get_tree().current_scene.add_child(cam_2d) + elif get_viewport().get_camera_3d() != null: + get_tree().current_scene.add_child(cam_3d) + + +func _new_scene(): + if get_tree() != null: + await get_tree().node_added + await get_tree().get_current_scene().ready + _ready() diff --git a/addons/debug_camera/scripts/DebugCamera2D.gd b/addons/debug_camera/scripts/DebugCamera2D.gd new file mode 100644 index 0000000..264f934 --- /dev/null +++ b/addons/debug_camera/scripts/DebugCamera2D.gd @@ -0,0 +1,61 @@ +extends Camera2D +class_name DebugCamera2D + +# Lower cap for the `_zoom_level`. +@export var min_zoom := 0.5 +# Upper cap for the `_zoom_level`. +@export var max_zoom := 2.0 +# Controls how much we increase or decrease the `_zoom_level` on every turn of the scroll wheel. +@export var zoom_factor := 0.1 +# Duration of the zoom's tween animation. +@export var zoom_duration := 0.2 + +# The camera's target zoom level. +var _zoom_level : float = 1.0 : + set(value): + var tween = get_tree().create_tween() + # We limit the value between `min_zoom` and `max_zoom` + _zoom_level = clamp(value, min_zoom, max_zoom) + tween.tween_property(self, "zoom", Vector2(_zoom_level, _zoom_level), zoom_duration).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_OUT) + +var _previousPosition: Vector2 = Vector2(0, 0) +var _moveCamera: bool = false + +var main_cam : Camera2D + + +func _ready() -> void: + main_cam = get_viewport().get_camera_2d() + + +func _process(_delta: float) -> void: + if !enabled: + position = main_cam.global_position + + +func _unhandled_input(event: InputEvent) -> void: + if event is InputEventMouseButton: + # zoom out + if event.pressed && event.button_index == MOUSE_BUTTON_WHEEL_DOWN: + _zoom_level = _zoom_level - zoom_factor * _zoom_level + # zoom in + if event.pressed && event.button_index == MOUSE_BUTTON_WHEEL_UP: + _zoom_level = _zoom_level + zoom_factor * _zoom_level + + if event is InputEventMouseButton && event.button_index == MOUSE_BUTTON_RIGHT: + if event.is_pressed(): + _previousPosition = event.position + _moveCamera = true + else: + _moveCamera = false + elif event is InputEventMouseMotion && _moveCamera: + position += (_previousPosition - event.position) / _zoom_level + _previousPosition = event.position + + # Toggle cameras + if event is InputEventKey && event.is_pressed(): + if event.keycode == KEY_MINUS: + var cam := main_cam + cam.enabled = !cam.enabled + enabled = !cam.enabled + diff --git a/addons/debug_camera/scripts/DebugCamera3D.gd b/addons/debug_camera/scripts/DebugCamera3D.gd new file mode 100644 index 0000000..7128b8c --- /dev/null +++ b/addons/debug_camera/scripts/DebugCamera3D.gd @@ -0,0 +1,61 @@ +extends Camera3D +class_name DebugCamera3D + + +@export_range(0, 10, 0.01) var sensitivity : float = 3 +@export_range(0, 1000, 0.1) var default_velocity : float = 5 +@export_range(0, 10, 0.01) var speed_scale : float = 1.17 +@export_range(1, 100, 0.1) var boost_speed_multiplier : float = 3.0 +@export var max_speed : float = 1000 +@export var min_speed : float = 0.2 + +@onready var _velocity = default_velocity + +var main_cam : Camera3D + + +func _ready() -> void: + main_cam = get_viewport().get_camera_3d() + + +func _process(delta: float) -> void: + if !current: + position = main_cam.global_position + rotation = main_cam.global_rotation + return + + var direction = Vector3( + float(Input.is_physical_key_pressed(KEY_D)) - float(Input.is_physical_key_pressed(KEY_A)), + float(Input.is_physical_key_pressed(KEY_E)) - float(Input.is_physical_key_pressed(KEY_Q)), + float(Input.is_physical_key_pressed(KEY_S)) - float(Input.is_physical_key_pressed(KEY_W)) + ).normalized() + + if Input.is_physical_key_pressed(KEY_SHIFT): # boost + translate(direction * _velocity * delta * boost_speed_multiplier) + else: + translate(direction * _velocity * delta) + + +func _unhandled_input(event: InputEvent) -> void: + if Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED: + if event is InputEventMouseMotion: + rotation.y -= event.relative.x / 1000 * sensitivity + rotation.x -= event.relative.y / 1000 * sensitivity + rotation.x = clamp(rotation.x, PI/-2, PI/2) + + if event is InputEventMouseButton: + match event.button_index: + MOUSE_BUTTON_RIGHT: + Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED if event.pressed else Input.MOUSE_MODE_VISIBLE) + MOUSE_BUTTON_WHEEL_UP: # increase fly velocity + _velocity = clamp(_velocity * speed_scale, min_speed, max_speed) + MOUSE_BUTTON_WHEEL_DOWN: # decrease fly velocity + _velocity = clamp(_velocity / speed_scale, min_speed, max_speed) + + # Toggle cameras + if event is InputEventKey && event.is_pressed(): + if event.keycode == KEY_MINUS: + var cam := main_cam + cam.current = !cam.current + current = !cam.current + diff --git a/addons/debug_camera/scripts/plugin.gd b/addons/debug_camera/scripts/plugin.gd new file mode 100644 index 0000000..96c2143 --- /dev/null +++ b/addons/debug_camera/scripts/plugin.gd @@ -0,0 +1,12 @@ +@tool +extends EditorPlugin + + +func _enter_tree(): + if not ProjectSettings.has_setting("autoload/DebugCam"): + add_autoload_singleton("DebugCam", "res://addons/debug_camera/scripts/DebugCamAutoload.gd") + + +func _exit_tree(): + if ProjectSettings.has_setting("autoload/DebugCam"): + remove_autoload_singleton("DebugCam") diff --git a/addons/godot-xr-toggle/LICENSE b/addons/godot-xr-toggle/LICENSE new file mode 100644 index 0000000..dbd9694 --- /dev/null +++ b/addons/godot-xr-toggle/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Daniel Castellanos and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/addons/godot-xr-toggle/export_plugin.gd b/addons/godot-xr-toggle/export_plugin.gd new file mode 100644 index 0000000..81f573a --- /dev/null +++ b/addons/godot-xr-toggle/export_plugin.gd @@ -0,0 +1,71 @@ +@tool +extends EditorExportPlugin + + +const PATH_EXTENSION_DEF = "res://.godot/extension_list.cfg" + +var gdextensions_exclude_list : Array +var extension_definition_buffer : String = "default" + + +func _get_name() -> String: + return "GodotXRToggleExport" + + +func _export_begin(features : PackedStringArray, _is_debug : bool, _path : String, _flags : int) -> void: + # GDExtension export disable + var gdextension_exclude_platforms : Dictionary = ProjectSettings.get_setting("godot_xr_toggle/export/exclude_gdextensions_from_export", {}) + for platform_name : String in gdextension_exclude_platforms.keys(): + if features.has(platform_name): + gdextensions_exclude_list = gdextension_exclude_platforms[platform_name] + + if not gdextensions_exclude_list.is_empty(): + var file_extension_list := FileAccess.open(PATH_EXTENSION_DEF, FileAccess.READ) + var extensions : String = file_extension_list.get_as_text() + file_extension_list.close() + + extension_definition_buffer = extensions + + var lines : PackedStringArray = extensions.split("\n") + var extensions_without_excluded : String = "" + + for line in lines: + for gdextension_name in gdextensions_exclude_list: + if not gdextension_name in line: + extensions_without_excluded += line + "\n" + + extensions_without_excluded = extensions_without_excluded.trim_suffix("\n") + + file_extension_list = FileAccess.open(PATH_EXTENSION_DEF, FileAccess.WRITE) + file_extension_list.store_string(extensions_without_excluded) + file_extension_list.close() + + # XR Mode force mode + var force_mode_platforms : Dictionary = ProjectSettings.get_setting("godot_xr_toggle/export/platforms_force_mode", {}) + for platform_name : String in force_mode_platforms.keys(): + if features.has(platform_name): + ProjectSettings.set_setting("xr/openxr/enabled", force_mode_platforms[platform_name]) + break + + +func _export_file(path : String, _type : String, _features : PackedStringArray) -> void: + # Remove editor-only override file before exporting + if path == "res://override.cfg": + skip() + + # Skip predefined GDExtensions + elif not gdextensions_exclude_list.is_empty(): + for gdextension_name in gdextensions_exclude_list: + if gdextension_name in path: + gdextensions_exclude_list.erase(gdextension_name) + skip() + break + +# Restore gdextension list +func _export_end() -> void: + gdextensions_exclude_list.clear() + if extension_definition_buffer != "default": + var file_extension_list := FileAccess.open(PATH_EXTENSION_DEF, FileAccess.WRITE) + file_extension_list.store_string(extension_definition_buffer) + file_extension_list.close() + extension_definition_buffer = "default" diff --git a/addons/godot-xr-toggle/plugin.cfg b/addons/godot-xr-toggle/plugin.cfg new file mode 100644 index 0000000..c084225 --- /dev/null +++ b/addons/godot-xr-toggle/plugin.cfg @@ -0,0 +1,7 @@ +[plugin] + +name="Godot XR Toggle" +description="A simple toggle to run with VR enabled or not, from the editor." +author="Daniel Castellanos (decacis)" +version="1.1.1" +script="plugin.gd" diff --git a/addons/godot-xr-toggle/plugin.gd b/addons/godot-xr-toggle/plugin.gd new file mode 100644 index 0000000..b7bb67b --- /dev/null +++ b/addons/godot-xr-toggle/plugin.gd @@ -0,0 +1,97 @@ +@tool +extends EditorPlugin + +var xr_toggle : CheckButton +var export_plugin : EditorExportPlugin + + +func _define_project_setting( + p_name : String, + p_type : int, + p_hint : int = PROPERTY_HINT_NONE, + p_hint_string : String = "", + p_default_val = "") -> void: + # p_default_val can be any type!! + + if !ProjectSettings.has_setting(p_name): + ProjectSettings.set_setting(p_name, p_default_val) + + var property_info : Dictionary = { + "name" : p_name, + "type" : p_type, + "hint" : p_hint, + "hint_string" : p_hint_string + } + + ProjectSettings.add_property_info(property_info) + if ProjectSettings.has_method("set_as_basic"): + ProjectSettings.call("set_as_basic", p_name, true) + ProjectSettings.set_initial_value(p_name, p_default_val) + + +func _enter_tree() -> void: + _create_export_plugin() + _create_toggle_control() + + # Add android to forced XR enabled platforms + _define_project_setting( + "godot_xr_toggle/export/platforms_force_mode", + TYPE_DICTIONARY, + PROPERTY_HINT_NONE, + "", + {"android": true} + ) + + # Add android to forced XR enabled platforms + _define_project_setting( + "godot_xr_toggle/export/exclude_gdextensions_from_export", + TYPE_DICTIONARY, + PROPERTY_HINT_NONE, + "", + { + "windows": [], + "linux": [], + "macos": [], + "android": [] + } + ) + + add_export_plugin(export_plugin) + add_control_to_container(EditorPlugin.CONTAINER_TOOLBAR, xr_toggle) + + # Initialize + _toggle_xr_mode(xr_toggle.button_pressed) + + +func _create_export_plugin() -> void: + if not export_plugin: + export_plugin = EditorExportPlugin.new() + export_plugin.set_script(load("res://addons/godot-xr-toggle/export_plugin.gd")) + +func _create_toggle_control() -> void: + if not xr_toggle: + xr_toggle = CheckButton.new() + xr_toggle.text = "XR Enabled" + xr_toggle.toggled.connect(_toggle_xr_mode) + + +func _toggle_xr_mode(toggled_on : bool) -> void: + if FileAccess.file_exists("res://override.cfg"): + DirAccess.remove_absolute("res://override.cfg") + + var config = ConfigFile.new() + # Enable OpenXR + config.set_value("xr", "openxr/enabled", toggled_on) + # Save override file + config.save("res://override.cfg") + + +func _exit_tree() -> void: + if FileAccess.file_exists("res://override.cfg"): + DirAccess.remove_absolute("res://override.cfg") + + if xr_toggle: + xr_toggle.queue_free() + + remove_export_plugin(export_plugin) + export_plugin = null diff --git a/assets/maps/holodeck/materials/holodeck_map_shader_with_alpha.tres b/assets/maps/holodeck/materials/holodeck_map_shader_with_alpha.tres index 15ab3e9..7198130 100644 --- a/assets/maps/holodeck/materials/holodeck_map_shader_with_alpha.tres +++ b/assets/maps/holodeck/materials/holodeck_map_shader_with_alpha.tres @@ -109,7 +109,7 @@ render_mode blend_mix, depth_draw_opaque, cull_back, diffuse_lambert, specular_s // Varyings -varying vec3 world_pos; +varying vec3 var_world_pos; uniform vec2 grid_scale = vec2(1.000000, 1.000000); uniform vec4 grid_color : source_color = vec4(1.000000, 0.891186, 0.000000, 1.000000); @@ -154,7 +154,7 @@ void vertex() { // VaryingSetter:15 - world_pos = n_out8p0; + var_world_pos = n_out8p0; } @@ -174,7 +174,7 @@ void fragment() { // VaryingGetter:6 - vec3 n_out6p0 = world_pos; + vec3 n_out6p0 = var_world_pos; // VectorDecompose:11 diff --git a/project.godot b/project.godot index 17aaf8d..de5c533 100644 --- a/project.godot +++ b/project.godot @@ -19,10 +19,11 @@ config/icon="res://icon.png" XRToolsUserSettings="*res://addons/godot-xr-tools/user_settings/user_settings.gd" XRToolsRumbleManager="*res://addons/godot-xr-tools/rumble/rumble_manager.gd" +DebugCam="*res://addons/debug_camera/scripts/DebugCamAutoload.gd" [editor_plugins] -enabled=PackedStringArray("res://addons/godot-xr-tools/plugin.cfg") +enabled=PackedStringArray("res://addons/debug_camera/plugin.cfg", "res://addons/godot-xr-toggle/plugin.cfg", "res://addons/godot-xr-tools/plugin.cfg") [filesystem] @@ -75,8 +76,6 @@ trigger_left={ [rendering] -renderer/rendering_method="gl_compatibility" -renderer/rendering_method.mobile="gl_compatibility" textures/vram_compression/import_etc2_astc=true limits/time/time_rollover_secs=30.0 diff --git a/scenes/world_grab_demo/world_grab_demo.tscn b/scenes/world_grab_demo/world_grab_demo.tscn index 53bda5e..f0bf6af 100644 --- a/scenes/world_grab_demo/world_grab_demo.tscn +++ b/scenes/world_grab_demo/world_grab_demo.tscn @@ -20,65 +20,65 @@ [ext_resource type="PackedScene" uid="uid://d3x7ha0qme5uv" path="res://scenes/world_grab_demo/objects/arena_cylinder.tscn" id="15_ghqx0"] [ext_resource type="PackedScene" uid="uid://v1ajdy8xxct3" path="res://scenes/world_grab_demo/objects/arena_wall.tscn" id="16_bar6p"] -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_fmn03"] +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_oa7lu"] animation = &"Grip" -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_1x2be"] +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_qypxn"] animation = &"Grip" -[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_0da3y"] +[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_24u04"] filter_enabled = true filters = ["Armature/Skeleton3D:Little_Distal_L", "Armature/Skeleton3D:Little_Intermediate_L", "Armature/Skeleton3D:Little_Metacarpal_L", "Armature/Skeleton3D:Little_Proximal_L", "Armature/Skeleton3D:Middle_Distal_L", "Armature/Skeleton3D:Middle_Intermediate_L", "Armature/Skeleton3D:Middle_Metacarpal_L", "Armature/Skeleton3D:Middle_Proximal_L", "Armature/Skeleton3D:Ring_Distal_L", "Armature/Skeleton3D:Ring_Intermediate_L", "Armature/Skeleton3D:Ring_Metacarpal_L", "Armature/Skeleton3D:Ring_Proximal_L", "Armature/Skeleton3D:Thumb_Distal_L", "Armature/Skeleton3D:Thumb_Metacarpal_L", "Armature/Skeleton3D:Thumb_Proximal_L", "Armature/Skeleton:Little_Distal_L", "Armature/Skeleton:Little_Intermediate_L", "Armature/Skeleton:Little_Proximal_L", "Armature/Skeleton:Middle_Distal_L", "Armature/Skeleton:Middle_Intermediate_L", "Armature/Skeleton:Middle_Proximal_L", "Armature/Skeleton:Ring_Distal_L", "Armature/Skeleton:Ring_Intermediate_L", "Armature/Skeleton:Ring_Proximal_L", "Armature/Skeleton:Thumb_Distal_L", "Armature/Skeleton:Thumb_Proximal_L"] -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_wj27r"] +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_5bk6a"] animation = &"Grip 5" -[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_7e2a6"] +[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_jy1ah"] filter_enabled = true filters = ["Armature/Skeleton3D:Index_Distal_L", "Armature/Skeleton3D:Index_Intermediate_L", "Armature/Skeleton3D:Index_Metacarpal_L", "Armature/Skeleton3D:Index_Proximal_L", "Armature/Skeleton:Index_Distal_L", "Armature/Skeleton:Index_Intermediate_L", "Armature/Skeleton:Index_Proximal_L"] -[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_m26jc"] +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_vuimn"] graph_offset = Vector2(-536, 11) -nodes/ClosedHand1/node = SubResource("AnimationNodeAnimation_fmn03") +nodes/ClosedHand1/node = SubResource("AnimationNodeAnimation_oa7lu") nodes/ClosedHand1/position = Vector2(-600, 300) -nodes/ClosedHand2/node = SubResource("AnimationNodeAnimation_1x2be") +nodes/ClosedHand2/node = SubResource("AnimationNodeAnimation_qypxn") nodes/ClosedHand2/position = Vector2(-360, 300) -nodes/Grip/node = SubResource("AnimationNodeBlend2_0da3y") +nodes/Grip/node = SubResource("AnimationNodeBlend2_24u04") nodes/Grip/position = Vector2(0, 20) -nodes/OpenHand/node = SubResource("AnimationNodeAnimation_wj27r") +nodes/OpenHand/node = SubResource("AnimationNodeAnimation_5bk6a") nodes/OpenHand/position = Vector2(-600, 100) -nodes/Trigger/node = SubResource("AnimationNodeBlend2_7e2a6") +nodes/Trigger/node = SubResource("AnimationNodeBlend2_jy1ah") nodes/Trigger/position = Vector2(-360, 20) node_connections = [&"Grip", 0, &"Trigger", &"Grip", 1, &"ClosedHand2", &"Trigger", 0, &"OpenHand", &"Trigger", 1, &"ClosedHand1", &"output", 0, &"Grip"] -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_2m0xq"] +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_y85uq"] animation = &"Grip" -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ejvd7"] +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ariwi"] animation = &"Grip" -[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_ti4n2"] +[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_vxm7a"] filter_enabled = true filters = ["Armature/Skeleton3D:Little_Distal_R", "Armature/Skeleton3D:Little_Intermediate_R", "Armature/Skeleton3D:Little_Metacarpal_R", "Armature/Skeleton3D:Little_Proximal_R", "Armature/Skeleton3D:Middle_Distal_R", "Armature/Skeleton3D:Middle_Intermediate_R", "Armature/Skeleton3D:Middle_Metacarpal_R", "Armature/Skeleton3D:Middle_Proximal_R", "Armature/Skeleton3D:Ring_Distal_R", "Armature/Skeleton3D:Ring_Intermediate_R", "Armature/Skeleton3D:Ring_Metacarpal_R", "Armature/Skeleton3D:Ring_Proximal_R", "Armature/Skeleton3D:Thumb_Distal_R", "Armature/Skeleton3D:Thumb_Metacarpal_R", "Armature/Skeleton3D:Thumb_Proximal_R", "Armature/Skeleton:Little_Distal_R", "Armature/Skeleton:Little_Intermediate_R", "Armature/Skeleton:Little_Proximal_R", "Armature/Skeleton:Middle_Distal_R", "Armature/Skeleton:Middle_Intermediate_R", "Armature/Skeleton:Middle_Proximal_R", "Armature/Skeleton:Ring_Distal_R", "Armature/Skeleton:Ring_Intermediate_R", "Armature/Skeleton:Ring_Proximal_R", "Armature/Skeleton:Thumb_Distal_R", "Armature/Skeleton:Thumb_Proximal_R"] -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_djme2"] +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_6278w"] animation = &"Grip 5" -[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_2oo4h"] +[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_a5tpk"] filter_enabled = true filters = ["Armature/Skeleton3D:Index_Distal_R", "Armature/Skeleton3D:Index_Intermediate_R", "Armature/Skeleton3D:Index_Metacarpal_R", "Armature/Skeleton3D:Index_Proximal_R", "Armature/Skeleton:Index_Distal_R", "Armature/Skeleton:Index_Intermediate_R", "Armature/Skeleton:Index_Proximal_R"] -[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_g51po"] +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_dx808"] graph_offset = Vector2(-552.664, 107.301) -nodes/ClosedHand1/node = SubResource("AnimationNodeAnimation_2m0xq") +nodes/ClosedHand1/node = SubResource("AnimationNodeAnimation_y85uq") nodes/ClosedHand1/position = Vector2(-600, 300) -nodes/ClosedHand2/node = SubResource("AnimationNodeAnimation_ejvd7") +nodes/ClosedHand2/node = SubResource("AnimationNodeAnimation_ariwi") nodes/ClosedHand2/position = Vector2(-360, 300) -nodes/Grip/node = SubResource("AnimationNodeBlend2_ti4n2") +nodes/Grip/node = SubResource("AnimationNodeBlend2_vxm7a") nodes/Grip/position = Vector2(0, 40) -nodes/OpenHand/node = SubResource("AnimationNodeAnimation_djme2") +nodes/OpenHand/node = SubResource("AnimationNodeAnimation_6278w") nodes/OpenHand/position = Vector2(-600, 100) -nodes/Trigger/node = SubResource("AnimationNodeBlend2_2oo4h") +nodes/Trigger/node = SubResource("AnimationNodeBlend2_a5tpk") nodes/Trigger/position = Vector2(-360, 40) node_connections = [&"Grip", 0, &"Trigger", &"Grip", 1, &"ClosedHand2", &"Trigger", 0, &"OpenHand", &"Trigger", 1, &"ClosedHand1", &"output", 0, &"Grip"] @@ -93,11 +93,11 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5, 3) [node name="LeftHand" parent="XROrigin3D/LeftHand" index="0" instance=ExtResource("2_dss28")] [node name="Skeleton3D" parent="XROrigin3D/LeftHand/LeftHand/Hand_Nails_low_L/Armature" index="0"] -bones/1/rotation = Quaternion(0.323537, -2.56577e-05, -0.0272204, 0.945824) +bones/1/rotation = Quaternion(0.323537, -2.56588e-05, -0.0272204, 0.945824) bones/2/rotation = Quaternion(-0.0904441, -0.0415175, -0.166293, 0.981042) bones/3/rotation = Quaternion(-0.0466199, 0.020971, 0.0103276, 0.998639) bones/5/rotation = Quaternion(-0.00128455, -0.0116081, -0.0168259, 0.99979) -bones/6/rotation = Quaternion(0.102925, -0.00993208, -0.00794417, 0.994608) +bones/6/rotation = Quaternion(0.102925, -0.00993208, -0.00794416, 0.994608) bones/7/rotation = Quaternion(-0.012859, -0.0236108, -0.323258, 0.945929) bones/8/rotation = Quaternion(0.0120575, -0.00929194, -0.247472, 0.968775) bones/10/rotation = Quaternion(-0.0357539, -0.000400032, 0.00636764, 0.99934) @@ -109,7 +109,7 @@ bones/16/rotation = Quaternion(-0.0320634, -0.00223624, -0.0686366, 0.997124) bones/17/rotation = Quaternion(0.0253452, 0.00812462, -0.249005, 0.968136) bones/18/rotation = Quaternion(0.00252232, 0.00788073, -0.243204, 0.96994) bones/20/rotation = Quaternion(-0.0917369, 0.0203027, -0.010183, 0.995524) -bones/21/rotation = Quaternion(-0.0625182, -0.00022572, -0.115393, 0.991351) +bones/21/rotation = Quaternion(-0.0625182, -0.000225721, -0.115393, 0.991351) bones/22/rotation = Quaternion(0.0585786, 0.0216483, -0.269905, 0.96086) bones/23/rotation = Quaternion(0.00687177, -0.00357275, -0.211953, 0.977249) @@ -121,7 +121,8 @@ bone_idx = 9 [node name="Poke" parent="XROrigin3D/LeftHand/LeftHand/Hand_Nails_low_L/Armature/Skeleton3D/BoneAttachment3D" index="0" instance=ExtResource("3_cmo20")] [node name="AnimationTree" parent="XROrigin3D/LeftHand/LeftHand" index="1"] -tree_root = SubResource("AnimationNodeBlendTree_m26jc") +root_node = NodePath("../Hand_Nails_low_L") +tree_root = SubResource("AnimationNodeBlendTree_vuimn") [node name="FunctionPickup" parent="XROrigin3D/LeftHand" index="1" instance=ExtResource("3_gbd4b")] @@ -130,7 +131,7 @@ tree_root = SubResource("AnimationNodeBlendTree_m26jc") [node name="RightHand" parent="XROrigin3D/RightHand" index="0" instance=ExtResource("4_xv2cc")] [node name="Skeleton3D" parent="XROrigin3D/RightHand/RightHand/Hand_Nails_low_R/Armature" index="0"] -bones/1/rotation = Quaternion(0.323537, 2.56577e-05, 0.0272204, 0.945824) +bones/1/rotation = Quaternion(0.323537, 2.56588e-05, 0.0272204, 0.945824) bones/2/rotation = Quaternion(-0.0904441, 0.0415175, 0.166293, 0.981042) bones/3/rotation = Quaternion(-0.0466199, -0.020971, -0.0103276, 0.998639) bones/5/rotation = Quaternion(-0.00128455, 0.0116081, 0.0168259, 0.99979) @@ -146,7 +147,7 @@ bones/16/rotation = Quaternion(-0.0320634, 0.00223624, 0.0686366, 0.997124) bones/17/rotation = Quaternion(0.0253452, -0.00812462, 0.249005, 0.968136) bones/18/rotation = Quaternion(0.00252233, -0.00788073, 0.243204, 0.96994) bones/20/rotation = Quaternion(-0.0917369, -0.0203027, 0.010183, 0.995524) -bones/21/rotation = Quaternion(-0.0625182, 0.000225721, 0.115393, 0.991351) +bones/21/rotation = Quaternion(-0.0625182, 0.000225722, 0.115393, 0.991351) bones/22/rotation = Quaternion(0.0585786, -0.0216483, 0.269905, 0.96086) bones/23/rotation = Quaternion(0.00687177, 0.00357275, 0.211953, 0.977249) @@ -158,7 +159,8 @@ bone_idx = 9 [node name="Poke" parent="XROrigin3D/RightHand/RightHand/Hand_Nails_low_R/Armature/Skeleton3D/BoneAttachment3D" index="0" instance=ExtResource("3_cmo20")] [node name="AnimationTree" parent="XROrigin3D/RightHand/RightHand" index="1"] -tree_root = SubResource("AnimationNodeBlendTree_g51po") +root_node = NodePath("../Hand_Nails_low_R") +tree_root = SubResource("AnimationNodeBlendTree_dx808") [node name="FunctionPickup" parent="XROrigin3D/RightHand" index="1" instance=ExtResource("3_gbd4b")] @@ -270,9 +272,6 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 1, -0.3) [node name="Teleport" parent="." index="4" instance=ExtResource("9_7cul8")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -6) title = ExtResource("10_phcsg") -spawn_point_name = "" -spawn_point_position = Vector3(0, 0, 0) -spawn_point_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) [editable path="XROrigin3D/LeftHand/LeftHand"] [editable path="XROrigin3D/LeftHand/LeftHand/Hand_Nails_low_L"]