# Mouse Axis Input Fix?

**URL:** <https://forums.unrealengine.com/t/mouse-axis-input-fix/1167043>\
**Category:** Blueprint\
**Tags:** unreal-engine, bug-report, editor, Blueprint, question\
**Created:** [May 16, 2023, 12:49am UTC](https://forums.unrealengine.com/t/mouse-axis-input-fix/1167043 "2023-05-16T00:49:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gore23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gore23](https://forums.unrealengine.com/u/Gore23)\
**Post date:** [May 16, 2023, 12:49am UTC](https://forums.unrealengine.com/t/mouse-axis-input-fix/1167043/1 "2023-05-16T00:49:23Z")

</div>

I am trying to print the location values of my mouse position in viewport when I move my mouse, but it only prints if I also press a mouse button down. It works how intended until I click on the game window and then the mouse axis inputs stop working without other presses unless the cursor is hidden… I have been trying to make my own cursor but I can never get it into the correct spot or anything properly like the normal cursor does naturaly…

I found a potential fix, but I am a blueprint only coder and have absolutely no idea how to even remotely implement this.

> [@MouseX BindAxis returning 0 unless mouse button depressed](https://forums.unrealengine.com/t/mousex-bindaxis-returning-0-unless-mouse-button-depressed/325857/11):
>
> Adding a comment to this thread because I’ve had the same issue If the mouse cursor is visible, even if you’re set to input mode Game Only and not UI or Game+UI, clicking in the viewport at all will deactivate the viewport as the current receiver of mouse events. From then on, your mouseX and mouseY values will be zero unless you click and hold a mouse button. The code driving this is in SceneViewport.cpp and, if you want to disable this behaviour, the code to modifiy is: bReleaseMouseCapt…

Is it possible that anyone knows an easy work around that I simply missed , or how to make this fix into a plugin or something for blueprint that you can use as a node to fix or something? Pretty please. I an desperate to fix this issue, it keeps ruinining my progress and motivation… Can’t figure this out no matter what I try… Just stuck on this every day all day…

---

<div class="post-metadata">

**Author:** ![BIGTIMEMASTER](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bigtimemaster/32/710746_2.png) [@BIGTIMEMASTER](https://forums.unrealengine.com/u/BIGTIMEMASTER)\
**Post date:** [May 16, 2023, 1:04am UTC](https://forums.unrealengine.com/t/mouse-axis-input-fix/1167043/2 "2023-05-16T01:04:05Z")

</div>

I only checked to confirm this one solution - there may be others - but you could try this:

There is a permanently free blueprint library called Low Entry Extended Standard Library. It has a node to return mouse position here:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/3/a/a3add578af1f30f9af7dd4a55e37235ab00e13eb.png)

I just double checked that it works without requiring any mouse down events. It also has some notes which could be of interest if you are trying to tackle a c++ solution:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/1/6/516fde40318e46b8b65d0bc6d291e1fa5f555d59.png)

It’s got lots of goodies I use all the time so grab it anyway if you didn’t already have it 🙂

---

<div class="post-metadata">

**Author:** ![Gore23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gore23](https://forums.unrealengine.com/u/Gore23)\
**Post date:** [May 16, 2023, 4:16am UTC](https://forums.unrealengine.com/t/mouse-axis-input-fix/1167043/3 "2023-05-16T04:16:39Z")

</div>

tat making my own cursor thing is just the alternative work around I was initially trying, preferable to fix the core issue if possible. But also, it is not the get mouse position thing that is the problem, but that I am trying to read that information and all that only when I am moving the mouse, but the games mouse axis input does register unless the cursor is hidden. Trying to figure that issue out the most.
