From a9d16fd96dd6e9db075d6a5458ab7f72ca733715 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Tue, 3 Jun 2025 10:17:33 -0400 Subject: Scan for addresses, use ImGui DragFloats --- Config.cs | 8 +- Plugin.cs | 324 +++++++++++++++++++++++++++++++++++--------------------------- 2 files changed, 187 insertions(+), 145 deletions(-) diff --git a/Config.cs b/Config.cs index 481f8b2..ade6564 100755 --- a/Config.cs +++ b/Config.cs @@ -77,14 +77,14 @@ namespace MHWNewCamera public float Roll { get; set; } } - public string Name => "MHWNewCamera"; - public string Version => "1.0.0"; + public String Name => "MHWNewCamera"; + public String Version => "1.0.0"; public Binds KeyboardBinds { get; set; } = new Binds(); public Settings CameraSettings { get; set; } = new Settings(); public bool KeyboardEnabled { get; set; } = false; public bool PerspectiveCameraEnabled { get; set; } = false; - public Dictionary Presets { get; set; } = new Dictionary(); - public string Selected { get; set; } = ""; + public Dictionary Presets { get; set; } = new Dictionary(); + public String Selected { get; set; } = ""; } } diff --git a/Plugin.cs b/Plugin.cs index d605321..458b659 100755 --- a/Plugin.cs +++ b/Plugin.cs @@ -1,13 +1,19 @@ -using ImGuiNET; +//#define ADDR_ASSERTS + +using ImGuiNET; using System.Numerics; using SharpPluginLoader.Core; using SharpPluginLoader.Core.Entities; using SharpPluginLoader.Core.IO; using SharpPluginLoader.Core.View; using SharpPluginLoader.Core.Memory; -using SharpPluginLoader.Core.MtTypes; using SharpPluginLoader.Core.Actions; +using SharpPluginLoader.Core.Components; +using SharpPluginLoader.Core.Resources.Animation; using SharpPluginLoader.Core.Configuration; +#if ADDR_ASSERTS +using System.Diagnostics; +#endif namespace MHWNewCamera { @@ -102,33 +108,75 @@ namespace MHWNewCamera ConfigManager.SaveConfig(this); - // Hook where we can adjust the camera position. - calculateCameraHook = Hook.Create(0x141fa5380, CalculateCameraHook); + // https://github.com/Andoryuuta/MHW-ClassPropDump + //calculateCameraHook = Hook.Create(0x142290620, CalculateCameraHook); + //calculateViewHook2 = Hook.Create(0x14228fb80, CalculateViewHook2); + + // Asserts based on version 15.23.00. + + // Hook where we can adjust the camera position. + nint addr = PatternScanner.FindFirst(Pattern.FromString("48 8B C4 55 41 57 48 81 EC D8 00 00 00 44 0F 29 40 B8 45 33 FF ?? ?? ?? ?? ?? ?? ?? ?? ?? 48 8B E9")); +#if ADDR_ASSERTS + Trace.Assert(addr == 0x141fa5380); +#endif + calculateCameraHook = Hook.Create(addr, CalculateCameraHook); // Hook where we can directly modify the view matrix. - calculateViewHook = Hook.Create(0x14228eb60, CalculateViewHook); - //calculateViewHook2 = Hook.Create(0x14228fb80, CalculateViewHook2); + addr = PatternScanner.FindFirst(Pattern.FromString("48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 48 89 7C 24 20 41 54 41 56 41 57 48 81 EC 90 00 00 00 ?? ?? ?? ?? ?? ?? ?? 48 8B F9")); +#if ADDR_ASSERTS + Trace.Assert(addr == 0x14228eb60); +#endif + calculateViewHook = Hook.Create(addr, CalculateViewHook); // Hook where we can adjust the analog stick value the game uses. - calculateMovementHook = Hook.Create(0x142107cb0, CalculateMovementHook); + addr = PatternScanner.FindFirst(Pattern.FromString("66 0F 6E C1 0F 5B C0 85 C9 78 11")); +#if ADDR_ASSERTS + Trace.Assert(addr == 0x142107cb0); +#endif + calculateMovementHook = Hook.Create(addr, CalculateMovementHook); unchecked { // Noop collision checks. - disableXCollision = new Patch((nint)0x141c001b5, [0x90, 0x90, 0x90, 0x90]); - disableYCollision = new Patch((nint)0x141c001c3, [0x90, 0x90, 0x90, 0x90, 0x90]); - disableSecondaryYCollision = new Patch((nint)0x141c000d2, [0x90, 0x90, 0x90, 0x90, 0x90]); - disableZCollision = new Patch((nint)0x141c001d2, [0x90, 0x90, 0x90, 0x90, 0x90]); - disableExtraYCollision = new Patch((nint)0x141bfff90, [0x90, 0x90, 0x90, 0x90, 0x90]); + addr = PatternScanner.FindFirst(Pattern.FromString("F3 0F 11 06 F3 0F 10 48 04 F3 0F 58 4E 04 F3 0F 11 4E 04 F3 0F 10 40 08 F3 0F 58 46 08 F3 0F 11 46 08 44 8B AF E0 0B 00 00")); +#if ADDR_ASSERTS + Trace.Assert(addr == 0x141c001b5); +#endif + disableXCollision = new Patch(addr, [0x90, 0x90, 0x90, 0x90]); +#if ADDR_ASSERTS + Trace.Assert(addr + 0xe == 0x141c001c3); +#endif + disableYCollision = new Patch(addr + 0xe, [0x90, 0x90, 0x90, 0x90, 0x90]); +#if ADDR_ASSERTS + Trace.Assert(addr + 0x1d == 0x141c001d2); +#endif + disableZCollision = new Patch(addr + 0x1d, [0x90, 0x90, 0x90, 0x90, 0x90]); + + addr = PatternScanner.FindFirst(Pattern.FromString("F3 0F 11 46 04 F3 0F 10 46 08 F3 0F 5C C2 F3 0F 11 46 08 ?? ?? F3 0F")); +#if ADDR_ASSERTS + Trace.Assert(addr == 0x141c000d2); +#endif + disableSecondaryYCollision = new Patch(addr, [0x90, 0x90, 0x90, 0x90, 0x90]); + + addr = PatternScanner.FindFirst(Pattern.FromString("F3 0F 11 46 04 F3 0F 10 58 08 F3 0F 58 5E 08 F3 0F 11 5E 08 44 8B 87 D0 0B 00 00 41 F6 C0 03")); +#if ADDR_ASSERTS + Trace.Assert(addr == 0x141bfff90); +#endif + disableExtraYCollision = new Patch(addr, [0x90, 0x90, 0x90, 0x90, 0x90]); } } + // These "assumeIn" functions are really scuffed and almost certainly could have + // more proper checks, I just haven't gotten around to it. + + // Quest board menu. private static bool assumeInQuestBoard(float fov) { return fov == 20.000038f || fov == 20.017189f || fov == 20.00004f; } + // Camera on rails animation, like when seeing a seasonal gathering hub for the first time. private bool assumeInAnimation(Viewport vp, Camera camera) { return vp.Camera != null && vp.Camera.Instance != camera.Instance && @@ -140,7 +188,6 @@ namespace MHWNewCamera // Assume the camera's FOV could end up at 50.942066 during normal // gameplay. Try to mitigate that by tracking the triggers for opening // the map (press and quickly release select, press A at departure location). - // This is a really rough hack but better than nothing for now. if (fov == 50.942066f) { if (!changeAfterOpenMap) return true; @@ -151,10 +198,7 @@ namespace MHWNewCamera } } - if (!changeAfterOpenMap) - { - changeAfterOpenMap = true; - } + if (!changeAfterOpenMap) changeAfterOpenMap = true; return false; } @@ -165,9 +209,9 @@ namespace MHWNewCamera if (fov == 50.0f) { if (!changeAfterGetUp) return true; - // fov = 50.0 is too common, assume the FOV will always be greater than 51.0 - // before sitting at the canteen. Also assuming that if FOV is 50.0 otherwise - // that previousFov will be something closer to 50.0. + // FOV = 50.0 is too common, assume the FOV will always be greater than 51.0 + // before sitting at the canteen. That's also assuming if FOV is 50.0 otherwise, + // that previousFov will be something closer to 50.0 because it was lowering last frame. if (previousFov >= 51.0f) { if (Input.IsPressed(Button.Cross) || (Input.IsDown(Button.Triangle) || Input.IsReleased(Button.Triangle))) @@ -178,10 +222,7 @@ namespace MHWNewCamera } } - if (!changeAfterGetUp) - { - changeAfterGetUp = true; - } + if (!changeAfterGetUp) changeAfterGetUp = true; return false; } @@ -292,61 +333,10 @@ namespace MHWNewCamera return calculateMovementHook!.Original(stickValue); } - private static void drawVector(Vector3 v, String name) - { - ImGui.Text($" {name}:"); - ImGui.Text($" X: {v.X:0.00}"); - ImGui.Text($" Y: {v.Y:0.00}"); - ImGui.Text($" Z: {v.Z:0.00}"); - } - - /* - private static void drawQuaternion(MtQuaternion q, String name) - { - ImGui.Text($" {name}:"); - ImGui.Text($" X: {q.X:0.00}"); - ImGui.Text($" Y: {q.Y:0.00}"); - ImGui.Text($" Z: {q.Z:0.00}"); - ImGui.Text($" W: {q.W:0.00}"); - } - */ - - private static void inputVector(ref Vector3 v, String name, String key) - { - ImGui.PushID(name + key); - ImGui.Text($" {name}:"); - float x = v.X; - float y = v.Y; - float z = v.Z; - if (ImGui.InputFloat($"X", ref x, 0.0f, 0.0f, null, ImGuiInputTextFlags.EnterReturnsTrue)) - { - v.X = x; - } - if (ImGui.InputFloat($"Y", ref y, 0.0f, 0.0f, null, ImGuiInputTextFlags.EnterReturnsTrue)) - { - v.Y = y; - } - if (ImGui.InputFloat($"Z", ref z, 0.0f, 0.0f, null, ImGuiInputTextFlags.EnterReturnsTrue)) - { - v.Z = z; - } - ImGui.PopID(); - } - - private static void inputQuaternion(ref MtQuaternion q, String name, String key) - { - ImGui.PushID(name + key); - ImGui.Text($" {name}:"); - ImGui.SliderFloat($"X", ref q.X, -1.0f, 1.0f); - ImGui.SliderFloat($"Y", ref q.Y, -1.0f, 1.0f); - ImGui.SliderFloat($"Z", ref q.Z, -1.0f, 1.0f); - ImGui.SliderFloat($"W", ref q.W, -1.0f, 1.0f); - ImGui.PopID(); - } - public void OnImGuiRender() { Config config = ConfigManager.GetConfig(this); + float width = ImGui.GetWindowWidth(); ImGui.Checkbox("Enable Free Camera", ref toggleFreeCamera); if (toggleFreeCamera) @@ -355,7 +345,7 @@ namespace MHWNewCamera } if (ImGui.Checkbox("Enable Perspective Camera", ref toggleOffsetPerspective)) { - // Take the oposite because it's yet to be toggled. + // Take the opposite because it's yet to be toggled. config.PerspectiveCameraEnabled = !offsetPerspective; ConfigManager.SaveConfig(this); } @@ -365,10 +355,10 @@ namespace MHWNewCamera } ImGui.PushID("Perspective"); - ImGui.SliderFloat("Field of View", ref cameraFov, 1.0f, 180.0f); - ImGui.SliderFloat("Forward", ref cameraForward, -360.0f, 360.0f); - ImGui.SliderFloat("Left", ref cameraLeft, -360.0f, 360.0f); - ImGui.SliderFloat("Up", ref cameraYOffset, -360.0f, 360.0f); + ImGui.DragFloat("Field of View", ref cameraFov, 0.4f, 1.0f, 180.0f); + ImGui.DragFloat("Forward", ref cameraForward, 0.4f, -360.0f, 360.0f); + ImGui.DragFloat("Left", ref cameraLeft, 0.4f, -360.0f, 360.0f); + ImGui.DragFloat("Up", ref cameraYOffset, 0.4f, -360.0f, 360.0f); if (ImGui.Button("Default")) { cameraFov = DEFAULT_FOV; @@ -383,7 +373,7 @@ namespace MHWNewCamera ImGui.SameLine(); if (ImGui.Button("Save")) { - String name = typedPresetName; + string name = typedPresetName; if (name != "") { Config.Preset preset = new Config.Preset(); @@ -405,7 +395,17 @@ namespace MHWNewCamera } } ImGui.SameLine(); - ImGui.PushItemWidth(170); + if (ImGui.Button("Delete")) + { + if (config.Selected != "") + { + config.Presets.Remove(config.Selected); + config.Selected = ""; + ConfigManager.SaveConfig(this); + } + } + ImGui.SameLine(); + ImGui.PushItemWidth(width * 0.2f); ImGui.InputText("##Preset Name", ref typedPresetName, 99); ImGui.SameLine(); if (ImGui.BeginCombo("##Preset", config.Selected)) @@ -413,11 +413,11 @@ namespace MHWNewCamera Dictionary.KeyCollection presetKeys = config.Presets.Keys; for (int i = 0; i < presetKeys.Count; i++) { - string key = presetKeys.ElementAt(i); - bool isSelected = key == config.Selected; - if (ImGui.Selectable(key, isSelected)) + string presetKey = presetKeys.ElementAt(i); + bool isSelected = presetKey == config.Selected; + if (ImGui.Selectable(presetKey, isSelected)) { - config.Selected = key; + config.Selected = presetKey; ConfigManager.SaveConfig(this); Config.Preset preset = config.Presets[config.Selected]; cameraFov = preset.FOV; @@ -426,10 +426,7 @@ namespace MHWNewCamera cameraYOffset = preset.Up; cameraRoll = preset.Roll; } - if (isSelected) - { - ImGui.SetItemDefaultFocus(); - } + if (isSelected) ImGui.SetItemDefaultFocus(); } ImGui.EndCombo(); } @@ -437,25 +434,25 @@ namespace MHWNewCamera ImGui.PopID(); ImGui.PushID("Settings"); - ImGui.SliderFloat("Camera Speed", ref cameraSpeed, 0.1f, 10.0f); + ImGui.DragFloat("Camera Speed", ref cameraSpeed, 0.01f, 0.0f); if (ImGui.BeginItemTooltip()) { ImGui.Text("Movement speed in freecam."); ImGui.EndTooltip(); } - ImGui.SliderFloat("Button Speed", ref cameraKeySpeed, 0.01f, 3.0f); + ImGui.DragFloat("Button Speed", ref cameraKeySpeed, 0.01f, 0.0f); if (ImGui.BeginItemTooltip()) { ImGui.Text("Rate of camera adjustment buttons/keybinds."); ImGui.EndTooltip(); } - ImGui.SliderFloat("Speed Modifier", ref cameraSpeedModifier, 0.1f, 10.0f); + ImGui.DragFloat("Speed Modifier", ref cameraSpeedModifier, 0.01f, 0.0f); if (ImGui.BeginItemTooltip()) { ImGui.Text("Value to multiply speed by when L2 is held."); ImGui.EndTooltip(); } - ImGui.SliderFloat("Camera Sensitivity", ref cameraSensitivity, 0.005f, 1.00f); + ImGui.DragFloat("Camera Sensitivity", ref cameraSensitivity, 0.0025f, 0.0f); if (ImGui.BeginItemTooltip()) { ImGui.Text("Camera look sensitivity in freecam."); @@ -497,24 +494,26 @@ namespace MHWNewCamera } ImGui.PopID(); + ImGui.PushID("Debug"); if (ImGui.CollapsingHeader("DEBUG")) { - ImGui.Text($"Camera/Viewport:"); + ImGui.PushID("Camera"); + ImGui.Text("Camera/Viewport:"); Viewport vp; for (int i = 0; i < 1; i++) { vp = CameraSystem.GetViewport(i); - ImGui.Text($" Pointer: {vp.Instance:x}"); - ImGui.Text($" Visible: {vp.Visible}"); - ImGui.Text($" Region: {vp.Region.X} {vp.Region.Y} {vp.Region.Width} {vp.Region.Height}"); + ImGui.Text($"Pointer: {vp.Instance:x}"); + ImGui.Text($"Visible: {vp.Visible}"); + ImGui.Text($"Region: {vp.Region.X} {vp.Region.Y} {vp.Region.Width} {vp.Region.Height}"); if (vp.Camera != null) { ImGui.InputFloat("X Offset", ref cameraXOffset); ImGui.InputFloat("Y Offset", ref cameraYOffset); ImGui.InputFloat("Z Offset", ref cameraZOffset); - ImGui.Text($" Camera Pointer: {vp.Camera.Instance:x}"); + ImGui.Text($"Camera Pointer: {vp.Camera.Instance:x}"); ImGui.InputFloat("FOV", ref vp.Camera.FieldOfView); - ImGui.Text($" Internal FOV: {previousFov}"); + ImGui.Text($"Internal FOV: {previousFov}"); if (ImGui.BeginItemTooltip()) { ImGui.Text("What the FOV would be if not set by us."); @@ -523,22 +522,22 @@ namespace MHWNewCamera ImGui.InputFloat("Aspect Ratio", ref vp.Camera.AspectRatio); ImGui.InputFloat("Far Clip", ref vp.Camera.FarClip); ImGui.InputFloat("Near Clip", ref vp.Camera.NearClip); - inputVector(ref vp.Camera.Position, "Position", "cam"); - inputVector(ref vp.Camera.Target, "Target", "cam"); - drawVector(vp.Camera.Up, "Up"); - ImGui.Text(" Rotation:"); + ImGui.DragFloat3("Position", ref vp.Camera.Position, 0.45f); + ImGui.DragFloat3("Target", ref vp.Camera.Target, 0.45f); + ImGui.DragFloat3("Up", ref vp.Camera.Up, 0.45f); + ImGui.Text("Rotation:"); float pitch = cameraPitch; - if (ImGui.InputFloat("Pitch", ref pitch, 0.0f, 0.0f, null, ImGuiInputTextFlags.EnterReturnsTrue)) + if (ImGui.InputFloat("Pitch", ref pitch, 0.25f)) { cameraPitch = pitch; } float yaw = cameraYaw; - if (ImGui.InputFloat("Yaw", ref yaw, 0.0f, 0.0f, null, ImGuiInputTextFlags.EnterReturnsTrue)) + if (ImGui.InputFloat("Yaw", ref yaw, 0.25f)) { cameraYaw = yaw; } float roll = cameraRoll; - if (ImGui.InputFloat("Roll", ref roll, 0.0f, 0.0f, null, ImGuiInputTextFlags.EnterReturnsTrue)) + if (ImGui.DragFloat("Roll", ref roll, 0.25f)) { cameraRoll = roll; } @@ -547,37 +546,19 @@ namespace MHWNewCamera { cameraPitchLimit = pitchLimit; } - ImGui.Text($" Move: {vp.Camera.Move}"); - ImGui.Text($" Fix: {vp.Camera.Fix}"); + ImGui.Text($"Move: {vp.Camera.Move}, Fix: {vp.Camera.Fix}"); } } - ImGui.Separator(); - ImGui.PushID("Pad"); - ImGui.Text($"Pad:"); - ImGui.Text($" Pointer: {sMhSteamController.Instance:x}"); - int PadRx = MemoryUtil.Read(sMhSteamController.Instance + 0x1b0); - int PadRy = MemoryUtil.Read(sMhSteamController.Instance + 0x1b4); - int PadLx = MemoryUtil.Read(sMhSteamController.Instance + 0x1b8); - int PadLy = MemoryUtil.Read(sMhSteamController.Instance + 0x1bc); - byte PadRz = MemoryUtil.Read(sMhSteamController.Instance + 0x1c0); - byte PadLz = MemoryUtil.Read(sMhSteamController.Instance + 0x1c1); - ImGui.Text(" Left Stick:"); - ImGui.Text($" X: {PadLx}"); - ImGui.Text($" Y: {PadLy}"); - ImGui.Text($" L2: {PadLz}"); - ImGui.Text(" Right Stick:"); - ImGui.Text($" X: {PadRx}"); - ImGui.Text($" Y: {PadRy}"); - ImGui.Text($" R2: {PadRz}"); ImGui.PopID(); - ImGui.Separator(); - ImGui.Text($"Player:"); + + ImGui.PushID("Player"); Player? player = Player.MainPlayer; if (player != null) { - ImGui.PushID("Player"); - ImGui.Text($" Pointer: {player.Instance:x}"); - inputVector(ref player.Position, "Position", "player"); + ImGui.Separator(); + ImGui.Text("Player:"); + ImGui.Text($"Pointer: {player.Instance:x}"); + ImGui.DragFloat3("Position", ref player.Position, 0.5f); if (ImGui.Checkbox("Disable Collision", ref disableCollision)) { if (disableCollision) @@ -611,15 +592,54 @@ namespace MHWNewCamera ImGui.Text("This will make your legs goofy, but it's needed to get on top of some things."); ImGui.EndTooltip(); } - inputQuaternion(ref player.Rotation, "Rotation", "player"); + Vector4 rotation; + rotation.X = player.Rotation.X; + rotation.Y = player.Rotation.Y; + rotation.Z = player.Rotation.Z; + rotation.W = player.Rotation.W; + if (ImGui.SliderFloat4("Rotation", ref rotation, -1.0f, 1.0f)) + { + player.Rotation.X = rotation.X; + player.Rotation.Y = rotation.Y; + player.Rotation.Z = rotation.Z; + player.Rotation.W = rotation.W; + } if (ImGui.Button("Reset")) { player.Rotation.X = 0.0f; player.Rotation.Z = 0.0f; } - drawVector(player.Forward, "Forward"); - ActionController actionController = player.ActionController; - ImGui.Text($" Action: {actionController.CurrentAction} Animation: {player.CurrentAnimation} Frame: {player.AnimationLayer!.CurrentFrame:0.000}"); + Vector3 forward; + forward.X = player.Forward.X; + forward.Y = player.Forward.Y; + forward.Z = player.Forward.Z; + ImGui.DragFloat3("Forward", ref forward, 0.0f); + ActionInfo currentActionInfo = player.ActionController.CurrentAction; + SharpPluginLoader.Core.Actions.Action? currentAction = null; + if (currentActionInfo.ActionSet >= 0 && currentActionInfo.ActionSet <= 3) + { + ActionList actionList = player.ActionController.GetActionList(currentActionInfo.ActionSet); + if (currentActionInfo.ActionId >= 0 && currentActionInfo.ActionId < actionList.Count) + { + currentAction = actionList[currentActionInfo.ActionId]; + } + } + AnimationLayerComponent? animationLayer = player.AnimationLayer; + AnimationId currentAnimation = player.CurrentAnimation; + ImGui.Text("Action/Animation:"); + ImGui.Text($" Current: {currentAction}, {currentAnimation}"); + if (animationLayer != null) + { + ImGui.Text($" Speed: {animationLayer.Speed:0.000}"); + ImGui.Text($" Frame: {animationLayer.CurrentFrame:0.000}/{animationLayer.MaxFrame:0.000}"); + } + if (currentAction != null) + { + ImGui.Text($" Active Time: {currentAction.ActiveTime}"); + // An experiment to test potential animation error could be try to keep deltasec as consistent as possible. + ImGui.Text($" Delta Sec: {currentAction.DeltaSec}"); + } + /* // https://github.com/HunterPie/HunterPie/blob/fa73f81ed0cdc921a6cf63f96c0fcff3688d88c2/HunterPie.Integrations/Datasources/MonsterHunterWorld/Entity/Game/MHWGame.cs#L74 bool playerInMenu = false; nint offset = MemoryUtil.Read(0x1451c4640); @@ -633,12 +653,34 @@ namespace MHWNewCamera playerInMenu = MemoryUtil.Read(offset) == 1; } } - ImGui.Text($" In Menu: {playerInMenu}"); - ImGui.Text($" Move: {player.Move}"); - ImGui.Text($" Fix: {player.Fix}"); - ImGui.PopID(); + ImGui.Text($"In Menu: {playerInMenu}"); + */ + ImGui.Text($"Move: {player.Move}, Fix: {player.Fix}"); } + ImGui.PopID(); + + ImGui.Separator(); + + ImGui.PushID("Pad"); + ImGui.Text("Pad:"); + ImGui.Text($"Pointer: {sMhSteamController.Instance:x}"); + int PadRx = MemoryUtil.Read(sMhSteamController.Instance + 0x1b0); + int PadRy = MemoryUtil.Read(sMhSteamController.Instance + 0x1b4); + int PadLx = MemoryUtil.Read(sMhSteamController.Instance + 0x1b8); + int PadLy = MemoryUtil.Read(sMhSteamController.Instance + 0x1bc); + byte PadRz = MemoryUtil.Read(sMhSteamController.Instance + 0x1c0); + byte PadLz = MemoryUtil.Read(sMhSteamController.Instance + 0x1c1); + ImGui.Text("Left Stick:"); + ImGui.Text($" X: {PadLx}"); + ImGui.Text($" Y: {PadLy}"); + ImGui.Text($" L2: {PadLz}"); + ImGui.Text("Right Stick:"); + ImGui.Text($" X: {PadRx}"); + ImGui.Text($" Y: {PadRy}"); + ImGui.Text($" R2: {PadRz}"); + ImGui.PopID(); } + ImGui.PopID(); } public void OnUpdate(float deltaTime) -- cgit v1.2.3-101-g0448