# Getting Mouse position Not Equal To Set Mouse Position

**URL:** <https://forums.unrealengine.com/t/getting-mouse-position-not-equal-to-set-mouse-position/2708471>\
**Category:** Blueprint\
**Tags:** bug, mouse-cursor, unreal-engine, mouse, mouse-position, question\
**Created:** [March 24, 2026, 2:19am UTC](https://forums.unrealengine.com/t/getting-mouse-position-not-equal-to-set-mouse-position/2708471 "2026-03-24T02:19:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roaringleagend45](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Roaringleagend45](https://forums.unrealengine.com/u/Roaringleagend45)\
**Post date:** [March 24, 2026, 2:19am UTC](https://forums.unrealengine.com/t/getting-mouse-position-not-equal-to-set-mouse-position/2708471/1 "2026-03-24T02:19:29Z")

</div>

I am setting the X mouse position to 100 but get different number when retrieving mouse position

depending on what function i get a different number

- from Viewport = 97.122314
- from Platform = 103.0

How do I get the same result? am I setting the mouse position wrong or getting the mouse position wrong or is it a bug?

 ![Screenshot 2026-03-23 210555](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/8/5/085a05f142198801eb08787796950c8c17a7fd08.png)

 ![Screenshot 2026-03-23 210648](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/0/3/c038591b6ac71eb1fd52b04afa6edbae88fa9197.png)

Ignore the extra functions

---

<div class="post-metadata">

**Author:** ![Auran131](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Auran131](https://forums.unrealengine.com/u/Auran131)\
**Post date:** [March 24, 2026, 3:39am UTC](https://forums.unrealengine.com/t/getting-mouse-position-not-equal-to-set-mouse-position/2708471/2 "2026-03-24T03:39:26Z")

</div>

i havent checked but it probably depends on your viewport scale, there is a node to get viewport scale as well

---

<div class="post-metadata">

**Author:** ![Roaringleagend45](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Roaringleagend45](https://forums.unrealengine.com/u/Roaringleagend45)\
**Post date:** [March 25, 2026, 12:54am UTC](https://forums.unrealengine.com/t/getting-mouse-position-not-equal-to-set-mouse-position/2708471/3 "2026-03-25T00:54:55Z")

</div>

Got viewport widget geometry and did local to viewport which gave me pretty close to 100.

result = 100.00000027 - probably due to floating point rounding error

So I just truncated it since its close enough for the scenario I need it for.
