diff --git a/3d/platformer/README.md b/3d/platformer/README.md index 7aefed8c97b..d65ec94ed7f 100644 --- a/3d/platformer/README.md +++ b/3d/platformer/README.md @@ -10,6 +10,9 @@ Renderer: Forward+ Check out this demo on the asset library: https://godotengine.org/asset-library/asset/2748 +This project uses Virtual joystick add-on by [`Marco F`](https://github.com/MarcoFazioRandom) for touch screen input. +check it out: https://godotengine.org/asset-library/asset/1787 + ## Screenshots ![Screenshot](screenshots/platformer.webp) diff --git a/3d/platformer/coin/coin.tscn b/3d/platformer/coin/coin.tscn index 7f8c03dc646..2ec84e9bb99 100644 --- a/3d/platformer/coin/coin.tscn +++ b/3d/platformer/coin/coin.tscn @@ -236,10 +236,10 @@ mesh = SubResource("QuadMesh_kqa4x") surface_material_override/0 = SubResource("StandardMaterial3D_7q0mq") [node name="Animation" type="AnimationPlayer" parent="."] -autoplay = "spin" libraries = { "": SubResource("AnimationLibrary_7v453") } +autoplay = "spin" [node name="CollisionShape3D" type="CollisionShape3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00894194, 0.575859, 0.0193955) diff --git a/3d/platformer/enemy/enemy.tscn b/3d/platformer/enemy/enemy.tscn index ab32efc624e..319f857261c 100644 --- a/3d/platformer/enemy/enemy.tscn +++ b/3d/platformer/enemy/enemy.tscn @@ -437,8 +437,8 @@ axis_lock_angular_y = true axis_lock_angular_z = true physics_material_override = SubResource("1") custom_integrator = true -max_contacts_reported = 5 contact_monitor = true +max_contacts_reported = 5 script = ExtResource("1") [node name="Enemy" parent="." instance=ExtResource("2_qf8n3")] @@ -448,13 +448,13 @@ bones/1/position = Vector3(-5.04871e-28, 0.661877, 0) bones/1/rotation = Quaternion(0.707107, -2.48537e-07, -1.95408e-07, 0.707107) bones/2/position = Vector3(-3.87449e-08, 0.475726, -0.0617121) bones/3/position = Vector3(0.913587, 0.661877, 0.631826) -bones/3/rotation = Quaternion(1, 0, 7.54979e-08, -1.05879e-22) +bones/3/rotation = Quaternion(1, -2.49197e-38, 7.54979e-08, -1.05879e-22) bones/5/position = Vector3(-0.913587, 0.661877, 0.631826) -bones/5/rotation = Quaternion(1, 0, 7.54979e-08, -1.05879e-22) +bones/5/rotation = Quaternion(1, -2.49197e-38, 7.54979e-08, -1.05879e-22) bones/7/position = Vector3(1.05436, 0.661877, -0.654576) -bones/7/rotation = Quaternion(1, 0, 7.54979e-08, -1.05879e-22) +bones/7/rotation = Quaternion(1, -2.49197e-38, 7.54979e-08, -1.05879e-22) bones/9/position = Vector3(-1.05436, 0.661877, -0.654576) -bones/9/rotation = Quaternion(1, 0, 7.54979e-08, -1.05879e-22) +bones/9/rotation = Quaternion(1, -2.49197e-38, 7.54979e-08, -1.05879e-22) [node name="RayFloor" type="RayCast3D" parent="Enemy/Skeleton" index="1"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.643772, 0.803052) @@ -465,11 +465,11 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.643772, 0.310413) target_position = Vector3(0, 0, 1.5) [node name="AnimationPlayer" parent="Enemy" index="1"] -autoplay = "walk" libraries = { "": SubResource("AnimationLibrary_f4l5d"), "extra": SubResource("AnimationLibrary_q27i1") } +autoplay = "walk" [node name="Sphere1" type="CollisionShape3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.74185, 0.267137) diff --git a/3d/platformer/export_presets.cfg b/3d/platformer/export_presets.cfg deleted file mode 100644 index 9573ac06e83..00000000000 --- a/3d/platformer/export_presets.cfg +++ /dev/null @@ -1,221 +0,0 @@ -[preset.0] - -exclude_filter="" -export_filter="all_resources" -include_filter="" -name="Linux/X11" -patch_list=PackedStringArray( ) -platform="Linux/X11" -runnable=true - -[preset.0.options] - -binary_format/64_bits=true -custom_template/debug="" -custom_template/release="" -texture_format/etc=false -texture_format/etc2=false -texture_format/s3tc=true - -[preset.1] - -exclude_filter="" -export_filter="all_resources" -include_filter="" -name="Android" -patch_list=PackedStringArray( ) -platform="Android" -runnable=true - -[preset.1.options] - -apk_expansion/SALT="" -apk_expansion/enable=false -apk_expansion/public_key="" -architecture/arm=true -architecture/x86=false -command_line/extra_args="" -custom_package/debug="" -custom_package/release="" -keystore/release="" -keystore/release_password="" -keystore/release_user="" -one_click_deploy/clear_previous_install=true -package/icon="" -package/name="" -package/signed=true -package/unique_name="org.godotengine.$genname" -permissions/access_checkin_properties=false -permissions/access_coarse_location=false -permissions/access_fine_location=false -permissions/access_location_extra_commands=false -permissions/access_mock_location=false -permissions/access_network_state=false -permissions/access_surface_flinger=false -permissions/access_wifi_state=false -permissions/account_manager=false -permissions/add_voicemail=false -permissions/authenticate_accounts=false -permissions/battery_stats=false -permissions/bind_accessibility_service=false -permissions/bind_appwidget=false -permissions/bind_device_admin=false -permissions/bind_input_method=false -permissions/bind_nfc_service=false -permissions/bind_notification_listener_service=false -permissions/bind_print_service=false -permissions/bind_remoteviews=false -permissions/bind_text_service=false -permissions/bind_vpn_service=false -permissions/bind_wallpaper=false -permissions/bluetooth=false -permissions/bluetooth_admin=false -permissions/bluetooth_privileged=false -permissions/brick=false -permissions/broadcast_package_removed=false -permissions/broadcast_sms=false -permissions/broadcast_sticky=false -permissions/broadcast_wap_push=false -permissions/call_phone=false -permissions/call_privileged=false -permissions/camera=false -permissions/capture_audio_output=false -permissions/capture_secure_video_output=false -permissions/capture_video_output=false -permissions/change_component_enabled_state=false -permissions/change_configuration=false -permissions/change_network_state=false -permissions/change_wifi_multicast_state=false -permissions/change_wifi_state=false -permissions/clear_app_cache=false -permissions/clear_app_user_data=false -permissions/control_location_updates=false -permissions/delete_cache_files=false -permissions/delete_packages=false -permissions/device_power=false -permissions/diagnostic=false -permissions/disable_keyguard=false -permissions/dump=false -permissions/expand_status_bar=false -permissions/factory_test=false -permissions/flashlight=false -permissions/force_back=false -permissions/get_accounts=false -permissions/get_package_size=false -permissions/get_tasks=false -permissions/get_top_activity_info=false -permissions/global_search=false -permissions/hardware_test=false -permissions/inject_events=false -permissions/install_location_provider=false -permissions/install_packages=false -permissions/install_shortcut=false -permissions/internal_system_window=false -permissions/internet=false -permissions/kill_background_processes=false -permissions/location_hardware=false -permissions/manage_accounts=false -permissions/manage_app_tokens=false -permissions/manage_documents=false -permissions/master_clear=false -permissions/media_content_control=false -permissions/modify_audio_settings=false -permissions/modify_phone_state=false -permissions/mount_format_filesystems=false -permissions/mount_unmount_filesystems=false -permissions/nfc=false -permissions/persistent_activity=false -permissions/process_outgoing_calls=false -permissions/read_calendar=false -permissions/read_call_log=false -permissions/read_contacts=false -permissions/read_external_storage=false -permissions/read_frame_buffer=false -permissions/read_history_bookmarks=false -permissions/read_input_state=false -permissions/read_logs=false -permissions/read_phone_state=false -permissions/read_profile=false -permissions/read_sms=false -permissions/read_social_stream=false -permissions/read_sync_settings=false -permissions/read_sync_stats=false -permissions/read_user_dictionary=false -permissions/reboot=false -permissions/receive_boot_completed=false -permissions/receive_mms=false -permissions/receive_sms=false -permissions/receive_wap_push=false -permissions/record_audio=false -permissions/reorder_tasks=false -permissions/restart_packages=false -permissions/send_respond_via_message=false -permissions/send_sms=false -permissions/set_activity_watcher=false -permissions/set_alarm=false -permissions/set_always_finish=false -permissions/set_animation_scale=false -permissions/set_debug_app=false -permissions/set_orientation=false -permissions/set_pointer_speed=false -permissions/set_preferred_applications=false -permissions/set_process_limit=false -permissions/set_time=false -permissions/set_time_zone=false -permissions/set_wallpaper=false -permissions/set_wallpaper_hints=false -permissions/signal_persistent_processes=false -permissions/status_bar=false -permissions/subscribed_feeds_read=false -permissions/subscribed_feeds_write=false -permissions/system_alert_window=false -permissions/transmit_ir=false -permissions/uninstall_shortcut=false -permissions/update_device_stats=false -permissions/use_credentials=false -permissions/use_sip=false -permissions/vibrate=false -permissions/wake_lock=false -permissions/write_apn_settings=false -permissions/write_calendar=false -permissions/write_call_log=false -permissions/write_contacts=false -permissions/write_external_storage=false -permissions/write_gservices=false -permissions/write_history_bookmarks=false -permissions/write_profile=false -permissions/write_secure_settings=false -permissions/write_settings=false -permissions/write_sms=false -permissions/write_social_stream=false -permissions/write_sync_settings=false -permissions/write_user_dictionary=false -screen/immersive_mode=true -screen/orientation=0 -screen/support_large=true -screen/support_normal=true -screen/support_small=true -screen/support_xlarge=true -screen/use_32_bits_view=true -user_permissions/0=false -user_permissions/1=false -user_permissions/10=false -user_permissions/11=false -user_permissions/12=false -user_permissions/13=false -user_permissions/14=false -user_permissions/15=false -user_permissions/16=false -user_permissions/17=false -user_permissions/18=false -user_permissions/19=false -user_permissions/2=false -user_permissions/3=false -user_permissions/4=false -user_permissions/5=false -user_permissions/6=false -user_permissions/7=false -user_permissions/8=false -user_permissions/9=false -version/code=1 -version/name="1.0" diff --git a/3d/platformer/game.tscn b/3d/platformer/game.tscn index 7194ee5b79c..a94cfb5996c 100644 --- a/3d/platformer/game.tscn +++ b/3d/platformer/game.tscn @@ -1,9 +1,11 @@ -[gd_scene load_steps=9 format=3 uid="uid://d0lrpf3mmjdsx"] +[gd_scene load_steps=13 format=3 uid="uid://d0lrpf3mmjdsx"] [ext_resource type="PackedScene" uid="uid://dohp772jyjxb7" path="res://stage/stage.tscn" id="1_ybvw5"] [ext_resource type="PackedScene" uid="uid://dfxo2jwbj4aeh" path="res://coin/coin.tscn" id="2_chew2"] [ext_resource type="PackedScene" uid="uid://o5q0hy6cg6nt" path="res://enemy/enemy.tscn" id="3_nhwvs"] [ext_resource type="PackedScene" uid="uid://cc4idhykjp5f5" path="res://player/player.tscn" id="4_ray4s"] +[ext_resource type="Script" path="res://touch_screen_ui.gd" id="5_7os5d"] +[ext_resource type="PackedScene" uid="uid://dmr0fcamx7t56" path="res://virtual_joystick/virtual_joystick_scene.tscn" id="5_smd4r"] [sub_resource type="PhysicsMaterial" id="1"] friction = 0.0 @@ -17,6 +19,11 @@ friction = 0.0 [sub_resource type="PhysicsMaterial" id="4"] friction = 0.0 +[sub_resource type="Theme" id="Theme_21ljx"] +CheckButton/font_sizes/font_size = 32 + +[sub_resource type="CanvasTexture" id="CanvasTexture_7o5bd"] + [node name="Game" type="Node3D"] [node name="Stage" parent="." instance=ExtResource("1_ybvw5")] @@ -264,3 +271,94 @@ physics_material_override = SubResource("4") [node name="Player" parent="." instance=ExtResource("4_ray4s")] transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -9.49833, -3.84189, 3.9334) + +[node name="ui" type="CanvasLayer" parent="."] + +[node name="CheckBox" type="CheckBox" parent="ui"] +unique_name_in_owner = true +offset_right = 24.0 +offset_bottom = 24.0 +focus_mode = 0 +text = "TouchScreen UI" + +[node name="touchScreenUi" type="CanvasLayer" parent="."] +script = ExtResource("5_7os5d") + +[node name="Virtual Joystick" parent="touchScreenUi" instance=ExtResource("5_smd4r")] +deadzone_size = 0.0 +clampzone_size = 100.0 + +[node name="performance" type="CheckButton" parent="touchScreenUi"] +anchors_preset = 1 +anchor_left = 1.0 +anchor_right = 1.0 +offset_left = -197.0 +offset_bottom = 31.0 +grow_horizontal = 0 +focus_mode = 0 +theme = SubResource("Theme_21ljx") +text = "performance mode" +alignment = 1 +icon_alignment = 1 +expand_icon = true + +[node name="HBoxContainer" type="HBoxContainer" parent="touchScreenUi"] +anchors_preset = 6 +anchor_left = 1.0 +anchor_top = 0.5 +anchor_right = 1.0 +anchor_bottom = 0.5 +offset_left = -256.0 +offset_top = -64.0 +offset_bottom = 64.0 +grow_horizontal = 0 +grow_vertical = 2 + +[node name="jump" type="Control" parent="touchScreenUi/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Label" type="Label" parent="touchScreenUi/HBoxContainer/jump"] +z_index = 5 +z_as_relative = false +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +text = "jump" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="jumpbtn" type="TouchScreenButton" parent="touchScreenUi/HBoxContainer/jump"] +self_modulate = Color(0, 0, 0, 1) +scale = Vector2(124, 124) +texture_normal = SubResource("CanvasTexture_7o5bd") +action = "jump" + +[node name="shoot" type="Control" parent="touchScreenUi/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="shoot" type="Label" parent="touchScreenUi/HBoxContainer/shoot"] +z_index = 5 +z_as_relative = false +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +text = "shoot" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="shoot2" type="TouchScreenButton" parent="touchScreenUi/HBoxContainer/shoot"] +self_modulate = Color(0, 0, 0, 1) +scale = Vector2(124, 124) +texture_normal = SubResource("CanvasTexture_7o5bd") +action = "shoot" + +[connection signal="toggled" from="ui/CheckBox" to="touchScreenUi" method="_on_check_box_toggled"] +[connection signal="toggled" from="touchScreenUi/performance" to="touchScreenUi" method="_on_performance_toggled"] diff --git a/3d/platformer/player/bullet/bullet.gd b/3d/platformer/player/bullet/bullet.gd index ff7943956af..db639171f70 100644 --- a/3d/platformer/player/bullet/bullet.gd +++ b/3d/platformer/player/bullet/bullet.gd @@ -4,3 +4,6 @@ extends RigidBody3D ## If `true`, the bullet can hit enemies. This is set to `false` when the bullet ## hits an enemy so it can't hit an enemy multiple times while the bullet is fading out. var enabled := true + +func hide_omniLight() -> void: + $OmniLight3D.hide() diff --git a/3d/platformer/player/bullet/bullet.tscn b/3d/platformer/player/bullet/bullet.tscn index 841208ee61e..82ff16a7882 100644 --- a/3d/platformer/player/bullet/bullet.tscn +++ b/3d/platformer/player/bullet/bullet.tscn @@ -154,17 +154,18 @@ libraries = { } autoplay = "life" -[node name="CPUParticles3D" type="CPUParticles3D" parent="."] +[node name="CPUParticles3D" type="CPUParticles3D" parent="." groups=["bad_performer"]] cast_shadow = 0 amount = 16 lifetime = 0.4 +visibility_aabb = AABB(-4, -4, -4, 8, 8, 8) mesh = SubResource("SphereMesh_hnt4a") spread = 0.0 gravity = Vector3(0, 0, 0) scale_amount_curve = SubResource("Curve_4e8sm") color_ramp = SubResource("Gradient_ic2ol") -[node name="CollisionShape3D" type="CollisionShape3D" parent="."] +[node name="CollisionShape3D" type="CollisionShape3D" parent="." groups=["bad_performer"]] shape = SubResource("SphereShape3D_vq2ey") [node name="OmniLight3D" type="OmniLight3D" parent="."] diff --git a/3d/platformer/player/player.gd b/3d/platformer/player/player.gd index dd3e97840d5..867f70ecebb 100644 --- a/3d/platformer/player/player.gd +++ b/3d/platformer/player/player.gd @@ -24,6 +24,8 @@ var jumping := false var prev_shoot := false var shoot_blend := 0.0 +static var performance_mode := false + # Number of coins collected. var coins := 0 @@ -67,7 +69,6 @@ func _physics_process(delta: float) -> void: movement_direction = movement_direction.normalized() var jump_attempt := Input.is_action_pressed(&"jump") - var shoot_attempt := Input.is_action_pressed(&"shoot") if is_on_floor(): var sharp_turn := horizontal_speed > 0.1 and \ @@ -150,10 +151,12 @@ func _physics_process(delta: float) -> void: shoot_blend *= 0.97 if (shoot_blend < 0): shoot_blend = 0 - + var shoot_attempt := Input.is_action_pressed(&"shoot") if shoot_attempt and not prev_shoot: shoot_blend = SHOOT_TIME var bullet := preload("res://player/bullet/bullet.tscn").instantiate() as Bullet + if performance_mode: + bullet.hide_omniLight() bullet.set_transform($Player/Skeleton/Bullet.get_global_transform().orthonormalized()) get_parent().add_child(bullet) bullet.set_linear_velocity( @@ -175,7 +178,6 @@ func _physics_process(delta: float) -> void: _animation_tree[&"parameters/air_dir/blend_amount"] = clampf(-velocity.y / 4 + 0.5, 0, 1) _animation_tree[&"parameters/gun/blend_amount"] = minf(shoot_blend, 1.0) - func adjust_facing(facing: Vector3, target: Vector3, step: float, adjust_rate: float, \ current_gn: Vector3) -> Vector3: var normal := target diff --git a/3d/platformer/player/player.tscn b/3d/platformer/player/player.tscn index e058c553db4..27860229f54 100644 --- a/3d/platformer/player/player.tscn +++ b/3d/platformer/player/player.tscn @@ -1,13 +1,9 @@ -[gd_scene load_steps=28 format=3 uid="uid://cc4idhykjp5f5"] +[gd_scene load_steps=24 format=3 uid="uid://cc4idhykjp5f5"] [ext_resource type="Script" path="res://player/player.gd" id="1"] [ext_resource type="Script" path="res://player/follow_camera.gd" id="2"] [ext_resource type="PackedScene" uid="uid://yd1e7ai2k5cr" path="res://player/player.glb" id="3_uccbe"] -[ext_resource type="Texture2D" uid="uid://kujhqacj3v72" path="res://player/controls/osb_up.webp" id="4_lmv6w"] -[ext_resource type="Texture2D" uid="uid://68sox6egj4j7" path="res://player/controls/osb_down.webp" id="5_4oxdy"] -[ext_resource type="Texture2D" uid="uid://r6qxvqi0unib" path="res://player/controls/osb_left.webp" id="6_k2dm4"] [ext_resource type="AudioStream" uid="uid://cdx3i7hr2acow" path="res://player/sound_shoot.wav" id="7"] -[ext_resource type="Texture2D" uid="uid://bw76q621n8fie" path="res://player/controls/osb_right.webp" id="7_yth2f"] [ext_resource type="AudioStream" uid="uid://bplqk77bffdxr" path="res://player/sound_jump.wav" id="8"] [sub_resource type="CapsuleShape3D" id="1"] @@ -79,13 +75,11 @@ node_connections = [&"air_dir", 0, &"Animation 3", &"air_dir", 1, &"Animation 4" random_pitch = 1.03 streams_count = 1 stream_0/stream = ExtResource("7") -stream_0/weight = 1.0 [sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_axa7i"] random_pitch = 1.03 streams_count = 1 stream_0/stream = ExtResource("8") -stream_0/weight = 1.0 [sub_resource type="Gradient" id="Gradient_p2tu5"] interpolation_mode = 2 @@ -118,15 +112,35 @@ script = ExtResource("2") [node name="Player" parent="." instance=ExtResource("3_uccbe")] [node name="Skeleton3D" parent="Player/Skeleton" index="0"] -bones/5/rotation = Quaternion(0.501129, -0.498869, -0.501128, 0.498869) -bones/9/rotation = Quaternion(-0.264667, 0.951702, -0.15503, -0.013433) -bones/10/rotation = Quaternion(0.744208, -0.433567, 0.504614, 0.0594899) -bones/11/rotation = Quaternion(0.264667, 0.951702, -0.15503, 0.013433) -bones/13/rotation = Quaternion(-0.000357303, 0.998602, 0.0504822, -0.0156872) -bones/14/rotation = Quaternion(0.720784, -0.0117194, -0.041935, 0.691791) -bones/15/rotation = Quaternion(0.998503, -0.0419896, 0.0282027, 0.0208377) -bones/16/rotation = Quaternion(0.000357169, 0.998602, 0.050483, 0.0156871) -bones/17/rotation = Quaternion(0.720784, 0.0117189, 0.0419352, 0.691791) +bones/1/position = Vector3(1.09056e-20, 2.10612, -6.88338e-14) +bones/1/rotation = Quaternion(1.42109e-13, -2.84217e-14, -7.28307e-22, 1) +bones/2/rotation = Quaternion(-1.42109e-13, -1.80682e-21, 4.58668e-21, 1) +bones/3/rotation = Quaternion(-0.020416, 1.27213e-08, -1.7937e-09, 0.999792) +bones/4/rotation = Quaternion(3.37177e-09, 0.996325, -0.08565, -9.39008e-07) +bones/5/rotation = Quaternion(0.501129, -0.498869, -0.501129, 0.498869) +bones/6/position = Vector3(-6.01139e-07, 0.0040059, -2.27374e-13) +bones/7/position = Vector3(3.05648e-08, 1.2429, 0.270992) +bones/8/rotation = Quaternion(0.744208, 0.433567, -0.504614, 0.0594899) +bones/9/rotation = Quaternion(-0.264667, 0.951702, -0.155029, -0.0134332) +bones/10/rotation = Quaternion(0.744208, -0.433567, 0.504614, 0.0594898) +bones/11/rotation = Quaternion(0.264667, 0.951702, -0.155029, 0.0134332) +bones/11/scale = Vector3(1, 1, 1) +bones/12/rotation = Quaternion(0.998503, 0.0419892, -0.0282026, 0.0208368) +bones/13/position = Vector3(4.87277e-08, 0.644635, -6.03109e-10) +bones/13/rotation = Quaternion(-0.000357039, 0.998602, 0.0504818, -0.0156871) +bones/14/rotation = Quaternion(0.720784, -0.0117192, -0.0419344, 0.691791) +bones/15/rotation = Quaternion(0.998503, -0.0419892, 0.0282027, 0.0208378) +bones/16/position = Vector3(-6.38546e-08, 0.644636, -8.27896e-10) +bones/16/rotation = Quaternion(0.000356988, 0.998602, 0.0504828, 0.015687) +bones/17/rotation = Quaternion(0.720784, 0.0117191, 0.0419345, 0.691791) +bones/18/position = Vector3(-4.35527e-07, 6.35228, 5.79659) +bones/18/rotation = Quaternion(1, -1.01905e-13, 7.54979e-08, -4.23517e-21) +bones/19/position = Vector3(0.518863, 0.204768, 3.89848e-08) +bones/20/position = Vector3(-0.518863, 0.204768, -3.89848e-08) +bones/21/position = Vector3(0.411677, 1.62881, 0.663951) +bones/22/position = Vector3(-0.411677, 1.62881, 0.66395) +bones/23/position = Vector3(2.62535, 2.59016, 0.186879) +bones/25/position = Vector3(1.57185, 3.44768, -0.510255) [node name="Robot" parent="Player/Skeleton/Skeleton3D" index="0"] layers = 2 @@ -186,42 +200,6 @@ parameters/scale/scale = 1.5 parameters/speed/blend_amount = 0 parameters/state/blend_amount = 0.0 -[node name="Forward" type="TouchScreenButton" parent="."] -visible = false -position = Vector2(72, 301) -texture_normal = ExtResource("4_lmv6w") -texture_pressed = ExtResource("4_lmv6w") -passby_press = true -action = "move_forward" -visibility_mode = 1 - -[node name="Backward" type="TouchScreenButton" parent="."] -visible = false -position = Vector2(72, 365) -texture_normal = ExtResource("5_4oxdy") -texture_pressed = ExtResource("5_4oxdy") -passby_press = true -action = "move_backwards" -visibility_mode = 1 - -[node name="Left" type="TouchScreenButton" parent="."] -visible = false -position = Vector2(29, 332) -texture_normal = ExtResource("6_k2dm4") -texture_pressed = ExtResource("6_k2dm4") -passby_press = true -action = "move_left" -visibility_mode = 1 - -[node name="Right" type="TouchScreenButton" parent="."] -visible = false -position = Vector2(114, 332) -texture_normal = ExtResource("7_yth2f") -texture_pressed = ExtResource("7_yth2f") -passby_press = true -action = "move_right" -visibility_mode = 1 - [node name="SoundShoot" type="AudioStreamPlayer" parent="."] stream = SubResource("AudioStreamRandomizer_basvh") @@ -229,7 +207,7 @@ stream = SubResource("AudioStreamRandomizer_basvh") stream = SubResource("AudioStreamRandomizer_axa7i") volume_db = -6.0 -[node name="BlobShadow" type="Decal" parent="."] +[node name="BlobShadow" type="Decal" parent="." groups=["bad_performer"]] size = Vector3(1.6, 12, 1.6) texture_albedo = SubResource("GradientTexture2D_kvc1x") albedo_mix = 0.8 diff --git a/3d/platformer/project.godot b/3d/platformer/project.godot index e392912784b..57b5cd8a380 100644 --- a/3d/platformer/project.godot +++ b/3d/platformer/project.godot @@ -22,6 +22,14 @@ config/icon="res://icon.webp" gdscript/warnings/untyped_declaration=1 +[display] + +window/stretch/mode="canvas_items" + +[global_group] + +bad_performer="" + [input] ui_accept={ @@ -126,7 +134,7 @@ jump={ shoot={ "deadzone": 0.2, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194326,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) -, 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":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null) +, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":1,"pressure":0.0,"pressed":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":10,"pressure":0.0,"pressed":false,"script":null) , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":5,"axis_value":1.0,"script":null) @@ -146,9 +154,9 @@ common/physics_ticks_per_second=120 [rendering] +renderer/rendering_method="mobile" lights_and_shadows/directional_shadow/size=8192 lights_and_shadows/directional_shadow/soft_shadow_filter_quality=3 -lights_and_shadows/positional_shadow/soft_shadow_filter_quality=0 textures/default_filters/anisotropic_filtering_level=4 textures/decals/filter=1 anti_aliasing/quality/msaa_3d=2 diff --git a/3d/platformer/stage/meshes/previews/corner_fix.webp.import b/3d/platformer/stage/meshes/previews/corner_fix.webp.import index 002f2ff7951..5b765707119 100644 --- a/3d/platformer/stage/meshes/previews/corner_fix.webp.import +++ b/3d/platformer/stage/meshes/previews/corner_fix.webp.import @@ -3,16 +3,16 @@ importer="texture" type="CompressedTexture2D" uid="uid://ckwv7e3lpmorb" -path.s3tc="res://.godot/imported/corner_fix.webp-bc947c0527b474b1e52d39a93f6cd55a.s3tc.ctex" +path.etc2="res://.godot/imported/corner_fix.webp-bc947c0527b474b1e52d39a93f6cd55a.etc2.ctex" metadata={ -"imported_formats": ["s3tc_bptc"], +"imported_formats": ["etc2_astc"], "vram_texture": true } [deps] source_file="res://stage/meshes/previews/corner_fix.webp" -dest_files=["res://.godot/imported/corner_fix.webp-bc947c0527b474b1e52d39a93f6cd55a.s3tc.ctex"] +dest_files=["res://.godot/imported/corner_fix.webp-bc947c0527b474b1e52d39a93f6cd55a.etc2.ctex"] [params] diff --git a/3d/platformer/stage/stage.tscn b/3d/platformer/stage/stage.tscn index 22af61863dc..905f20ac4c1 100644 --- a/3d/platformer/stage/stage.tscn +++ b/3d/platformer/stage/stage.tscn @@ -42,7 +42,7 @@ directional_shadow_mode = 0 directional_shadow_fade_start = 1.0 directional_shadow_max_distance = 55.0 -[node name="Reflection1" type="ReflectionProbe" parent="."] +[node name="Reflection1" type="ReflectionProbe" parent="." groups=["bad_performer"]] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.28208, 1, -1) intensity = 0.5 max_distance = 60.0 @@ -50,14 +50,14 @@ size = Vector3(35.9516, 20, 52.5818) origin_offset = Vector3(0, -1.5, 0) box_projection = true -[node name="Reflection2" type="ReflectionProbe" parent="."] +[node name="Reflection2" type="ReflectionProbe" parent="." groups=["bad_performer"]] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 15, 0, 0) intensity = 0.5 size = Vector3(16, 5, 6) origin_offset = Vector3(0, -0.22168, 0) box_projection = true -[node name="Reflection3" type="ReflectionProbe" parent="."] +[node name="Reflection3" type="ReflectionProbe" parent="." groups=["bad_performer"]] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 20, 0, 4) intensity = 0.5 max_distance = 18.7 @@ -65,7 +65,7 @@ size = Vector3(6, 6, 12) origin_offset = Vector3(0, -0.22168, 0) box_projection = true -[node name="Reflection7" type="ReflectionProbe" parent="."] +[node name="Reflection7" type="ReflectionProbe" parent="." groups=["bad_performer"]] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 17.0391, 6.19519, 1.14534) intensity = 0.5 max_distance = 18.7 @@ -73,7 +73,7 @@ size = Vector3(8, 6, 14) origin_offset = Vector3(0, -0.22168, 0) box_projection = true -[node name="Reflection4" type="ReflectionProbe" parent="."] +[node name="Reflection4" type="ReflectionProbe" parent="." groups=["bad_performer"]] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 21, 1, 15) intensity = 0.5 max_distance = 60.0 @@ -81,14 +81,14 @@ size = Vector3(24, 20, 16) origin_offset = Vector3(-4.6, -1.4, 0) box_projection = true -[node name="Reflection5" type="ReflectionProbe" parent="."] +[node name="Reflection5" type="ReflectionProbe" parent="." groups=["bad_performer"]] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 47.5486, 1, 8) intensity = 0.5 max_distance = 60.0 size = Vector3(36.9944, 20, 44.786) origin_offset = Vector3(0, -6.5, 0) -[node name="Reflection6" type="ReflectionProbe" parent="."] +[node name="Reflection6" type="ReflectionProbe" parent="." groups=["bad_performer"]] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 25.0962, 0.999998, -15.4268) intensity = 0.5 max_distance = 60.0 diff --git a/3d/platformer/touch_screen_ui.gd b/3d/platformer/touch_screen_ui.gd new file mode 100644 index 00000000000..347343698d5 --- /dev/null +++ b/3d/platformer/touch_screen_ui.gd @@ -0,0 +1,17 @@ +extends CanvasLayer + +var player_script:= preload("res://player/player.gd") + +func _ready() -> void: + hide() + if DisplayServer.is_touchscreen_available(): + %CheckBox.button_pressed = true + +func _on_performance_toggled(toggled_on: bool) -> void: + player_script.performance_mode = toggled_on + for child in get_tree().get_nodes_in_group("bad_performer"): + child.visible = !toggled_on + + +func _on_check_box_toggled(toggled_on: bool) -> void: + visible = toggled_on diff --git a/3d/platformer/virtual_joystick/textures/joystick_base_outline.png b/3d/platformer/virtual_joystick/textures/joystick_base_outline.png new file mode 100644 index 00000000000..7cae462a42a Binary files /dev/null and b/3d/platformer/virtual_joystick/textures/joystick_base_outline.png differ diff --git a/3d/platformer/virtual_joystick/textures/joystick_base_outline.png.import b/3d/platformer/virtual_joystick/textures/joystick_base_outline.png.import new file mode 100644 index 00000000000..8fcf1f83134 --- /dev/null +++ b/3d/platformer/virtual_joystick/textures/joystick_base_outline.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bm30au8mjfc2f" +path="res://.godot/imported/joystick_base_outline.png-7371cc27054d3586a976ff242922b457.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://virtual_joystick/textures/joystick_base_outline.png" +dest_files=["res://.godot/imported/joystick_base_outline.png-7371cc27054d3586a976ff242922b457.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +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=1 diff --git a/3d/platformer/virtual_joystick/textures/joystick_tip.png b/3d/platformer/virtual_joystick/textures/joystick_tip.png new file mode 100644 index 00000000000..28c57acd8e3 Binary files /dev/null and b/3d/platformer/virtual_joystick/textures/joystick_tip.png differ diff --git a/3d/platformer/virtual_joystick/textures/joystick_tip.png.import b/3d/platformer/virtual_joystick/textures/joystick_tip.png.import new file mode 100644 index 00000000000..8de8800abc9 --- /dev/null +++ b/3d/platformer/virtual_joystick/textures/joystick_tip.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bkvmydfn5saxg" +path="res://.godot/imported/joystick_tip.png-3ba99121153ac94d1690ccb41f89f5bb.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://virtual_joystick/textures/joystick_tip.png" +dest_files=["res://.godot/imported/joystick_tip.png-3ba99121153ac94d1690ccb41f89f5bb.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +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=1 diff --git a/3d/platformer/virtual_joystick/textures/joystick_tip_arrows.png b/3d/platformer/virtual_joystick/textures/joystick_tip_arrows.png new file mode 100644 index 00000000000..b4caa99b3cb Binary files /dev/null and b/3d/platformer/virtual_joystick/textures/joystick_tip_arrows.png differ diff --git a/3d/platformer/virtual_joystick/textures/joystick_tip_arrows.png.import b/3d/platformer/virtual_joystick/textures/joystick_tip_arrows.png.import new file mode 100644 index 00000000000..3b155ff8e80 --- /dev/null +++ b/3d/platformer/virtual_joystick/textures/joystick_tip_arrows.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dt13r06u87fib" +path="res://.godot/imported/joystick_tip_arrows.png-7681b297d95c3fc1ad24b8e054c68c3f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://virtual_joystick/textures/joystick_tip_arrows.png" +dest_files=["res://.godot/imported/joystick_tip_arrows.png-7681b297d95c3fc1ad24b8e054c68c3f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +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=1 diff --git a/3d/platformer/virtual_joystick/virtual_joystick.gd b/3d/platformer/virtual_joystick/virtual_joystick.gd new file mode 100644 index 00000000000..6674f4ab9fb --- /dev/null +++ b/3d/platformer/virtual_joystick/virtual_joystick.gd @@ -0,0 +1,169 @@ +class_name VirtualJoystick + +extends Control + +## A simple virtual joystick for touchscreens, with useful options. +## Github: https://github.com/MarcoFazioRandom/Virtual-Joystick-Godot + +# EXPORTED VARIABLE + +## The color of the button when the joystick is pressed. +@export var pressed_color := Color.GRAY + +## If the input is inside this range, the output is zero. +@export_range(0, 200, 1) var deadzone_size : float = 10 + +## The max distance the tip can reach. +@export_range(0, 500, 1) var clampzone_size : float = 75 + +enum Joystick_mode { + FIXED, ## The joystick doesn't move. + DYNAMIC, ## Every time the joystick area is pressed, the joystick position is set on the touched position. + FOLLOWING ## When the finger moves outside the joystick area, the joystick will follow it. +} + +## If the joystick stays in the same position or appears on the touched position when touch is started +@export var joystick_mode := Joystick_mode.FIXED + +enum Visibility_mode { + ALWAYS, ## Always visible + TOUCHSCREEN_ONLY, ## Visible on touch screens only + WHEN_TOUCHED ## Visible only when touched +} + +## If the joystick is always visible, or is shown only if there is a touchscreen +@export var visibility_mode := Visibility_mode.ALWAYS + +## If true, the joystick uses Input Actions (Project -> Project Settings -> Input Map) +@export var use_input_actions := true + +@export var action_left := "move_left" +@export var action_right := "move_right" +@export var action_up := "move_forward" +@export var action_down := "move_back" + +# PUBLIC VARIABLES + +## If the joystick is receiving inputs. +var is_pressed := false + +# The joystick output. +var output := Vector2.ZERO + +# PRIVATE VARIABLES + +var _touch_index : int = -1 + +@onready var _base := $Base +@onready var _tip := $Base/Tip + +@onready var _base_default_position : Vector2 = _base.position +@onready var _tip_default_position : Vector2 = _tip.position + +@onready var _default_color : Color = _tip.modulate + +# FUNCTIONS + +func _ready() -> void: + if not DisplayServer.is_touchscreen_available(): + hide() + + if visibility_mode == Visibility_mode.WHEN_TOUCHED: + hide() + +func _input(event: InputEvent) -> void: + if event is InputEventScreenTouch: + if event.pressed: + if _is_point_inside_joystick_area(event.position) and _touch_index == -1: + if joystick_mode == Joystick_mode.DYNAMIC or joystick_mode == Joystick_mode.FOLLOWING or (joystick_mode == Joystick_mode.FIXED and _is_point_inside_base(event.position)): + if joystick_mode == Joystick_mode.DYNAMIC or joystick_mode == Joystick_mode.FOLLOWING: + _move_base(event.position) + if visibility_mode == Visibility_mode.WHEN_TOUCHED: + show() + _touch_index = event.index + _tip.modulate = pressed_color + _update_joystick(event.position) + get_viewport().set_input_as_handled() + elif event.index == _touch_index: + _reset() + if visibility_mode == Visibility_mode.WHEN_TOUCHED: + hide() + get_viewport().set_input_as_handled() + elif event is InputEventScreenDrag: + if event.index == _touch_index: + _update_joystick(event.position) + get_viewport().set_input_as_handled() + +func _move_base(new_position: Vector2) -> void: + _base.global_position = new_position - _base.pivot_offset * get_global_transform_with_canvas().get_scale() + +func _move_tip(new_position: Vector2) -> void: + _tip.global_position = new_position - _tip.pivot_offset * _base.get_global_transform_with_canvas().get_scale() + +func _is_point_inside_joystick_area(point: Vector2) -> bool: + var x: bool = point.x >= global_position.x and point.x <= global_position.x + (size.x * get_global_transform_with_canvas().get_scale().x) + var y: bool = point.y >= global_position.y and point.y <= global_position.y + (size.y * get_global_transform_with_canvas().get_scale().y) + return x and y + +func _get_base_radius() -> Vector2: + return _base.size * _base.get_global_transform_with_canvas().get_scale() / 2 + +func _is_point_inside_base(point: Vector2) -> bool: + var _base_radius: = _get_base_radius() + var center : Vector2 = _base.global_position + _base_radius + var vector : Vector2 = point - center + if vector.length_squared() <= _base_radius.x * _base_radius.x: + return true + else: + return false + +func _update_joystick(touch_position: Vector2) -> void: + var _base_radius: = _get_base_radius() + var center : Vector2 = _base.global_position + _base_radius + var vector : Vector2 = touch_position - center + vector = vector.limit_length(clampzone_size) + + if joystick_mode == Joystick_mode.FOLLOWING and touch_position.distance_to(center) > clampzone_size: + _move_base(touch_position - vector) + + _move_tip(center + vector) + + if vector.length_squared() > deadzone_size * deadzone_size: + is_pressed = true + output = (vector - (vector.normalized() * deadzone_size)) / (clampzone_size - deadzone_size) + else: + is_pressed = false + output = Vector2.ZERO + + if use_input_actions: + # Release actions + if output.x >= 0 and Input.is_action_pressed(action_left): + Input.action_release(action_left) + if output.x <= 0 and Input.is_action_pressed(action_right): + Input.action_release(action_right) + if output.y >= 0 and Input.is_action_pressed(action_up): + Input.action_release(action_up) + if output.y <= 0 and Input.is_action_pressed(action_down): + Input.action_release(action_down) + # Press actions + if output.x < 0: + Input.action_press(action_left, -output.x) + if output.x > 0: + Input.action_press(action_right, output.x) + if output.y < 0: + Input.action_press(action_up, -output.y) + if output.y > 0: + Input.action_press(action_down, output.y) + +func _reset() -> void: + is_pressed = false + output = Vector2.ZERO + _touch_index = -1 + _tip.modulate = _default_color + _base.position = _base_default_position + _tip.position = _tip_default_position + # Release actions + if use_input_actions: + for action:String in [action_left, action_right, action_down, action_up]: + if Input.is_action_pressed(action): + Input.action_release(action) diff --git a/3d/platformer/virtual_joystick/virtual_joystick_scene.tscn b/3d/platformer/virtual_joystick/virtual_joystick_scene.tscn new file mode 100644 index 00000000000..6aef6b93d2f --- /dev/null +++ b/3d/platformer/virtual_joystick/virtual_joystick_scene.tscn @@ -0,0 +1,51 @@ +[gd_scene load_steps=4 format=3 uid="uid://dmr0fcamx7t56"] + +[ext_resource type="Script" path="res://virtual_joystick/virtual_joystick.gd" id="1_8x4dy"] +[ext_resource type="Texture2D" uid="uid://bm30au8mjfc2f" path="res://virtual_joystick/textures/joystick_base_outline.png" id="2_jhjs2"] +[ext_resource type="Texture2D" uid="uid://dt13r06u87fib" path="res://virtual_joystick/textures/joystick_tip_arrows.png" id="3_3etdg"] + +[node name="Virtual Joystick" type="Control"] +layout_mode = 3 +anchors_preset = 2 +anchor_top = 1.0 +anchor_bottom = 1.0 +offset_top = -308.0 +offset_right = 300.0 +offset_bottom = -8.0 +grow_vertical = 0 +script = ExtResource("1_8x4dy") + +[node name="Base" type="TextureRect" parent="."] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -100.0 +offset_top = -100.0 +offset_right = 100.0 +offset_bottom = 100.0 +grow_horizontal = 2 +grow_vertical = 2 +pivot_offset = Vector2(100, 100) +mouse_force_pass_scroll_events = false +texture = ExtResource("2_jhjs2") +stretch_mode = 5 + +[node name="Tip" type="TextureRect" parent="Base"] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -50.0 +offset_top = -50.0 +offset_right = 50.0 +offset_bottom = 50.0 +grow_horizontal = 2 +grow_vertical = 2 +pivot_offset = Vector2(50, 50) +texture = ExtResource("3_3etdg") +stretch_mode = 5 diff --git a/gui/input_mapping/project.godot b/gui/input_mapping/project.godot index a98c661bf6b..0054d83e565 100644 --- a/gui/input_mapping/project.godot +++ b/gui/input_mapping/project.godot @@ -18,7 +18,7 @@ config/description="A demo showing how to build an input key remapping screen. after the project is restarted." config/tags=PackedStringArray("demo", "gui", "input", "official", "settings") run/main_scene="res://InputRemapMenu.tscn" -config/features=PackedStringArray("4.2") +config/features=PackedStringArray("4.3") config/icon="res://icon.webp" [autoload] @@ -40,27 +40,27 @@ window/stretch/aspect="expand" move_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":4194321,"key_label":0,"unicode":0,"echo":false,"script":null) +"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":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) ] } move_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":4194319,"key_label":0,"unicode":0,"echo":false,"script":null) +"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":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) ] } look_up={ "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":4194320,"key_label":0,"unicode":0,"echo":false,"script":null) +"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":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) ] } crouch={ "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":4194325,"key_label":0,"unicode":0,"echo":false,"script":null) +"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":4194325,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) ] } 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,"echo":false,"script":null) +"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) ] }