From 8f177ffa0e16eb161045ef7abec4a27e06d0f874 Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Sat, 10 Jun 2023 17:18:19 -0400 Subject: [PATCH] Les fleches c'est pour les noobs. --- player/player.cs | 10 ++++++++++ project.godot | 27 +++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/player/player.cs b/player/player.cs index 683aa5f..387178b 100644 --- a/player/player.cs +++ b/player/player.cs @@ -23,6 +23,15 @@ public partial class player : Camera3D Vector3 rot = this.Rotation; bool zin = true, zout = true; + if (Input.IsActionPressed("CamNorth")) + _mUp = true; + if (Input.IsActionPressed("CamSouth")) + _mDown = true; + if (Input.IsActionPressed("CamEast")) + _mRight = true; + if (Input.IsActionPressed("CamWest")) + _mLeft = true; + this.Rotation -= rot; if (this.Position.Y < 5) zin = false; @@ -67,5 +76,6 @@ public partial class player : Camera3D else if (mousebtn.ButtonIndex == MouseButton.WheelDown) _wOut = true; } + } } diff --git a/project.godot b/project.godot index ea44d9a..8745dc0 100644 --- a/project.godot +++ b/project.godot @@ -23,3 +23,30 @@ window/size/viewport_height=1080 [dotnet] project/assembly_name="Mad" + +[input] + +CamNorth={ +"deadzone": 0.5, +"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":87,"key_label":0,"unicode":0,"echo":false,"script":null) +, 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) +] +} +CamSouth={ +"deadzone": 0.5, +"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,"echo":false,"script":null) +, 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":4194322,"key_label":0,"unicode":0,"echo":false,"script":null) +] +} +CamWest={ +"deadzone": 0.5, +"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":65,"key_label":0,"unicode":97,"echo":false,"script":null) +, 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) +] +} +CamEast={ +"deadzone": 0.5, +"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,"echo":false,"script":null) +, 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) +] +}