Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Input.mousePosition to scaled canvas space coordinates

$
0
0
How do you account for Canvas Scaler match width or height mode set to 0.5 when trying to get the mouse click coordinates in canvas space?

Here's a video demonstrating the issue:


Detailed description

I am trying to put a small white image in the position the mouse clicks and to have it work in any screen resolution.

Canvas

Render Mode: ScreenSpace - Overlay
- Pixel perfect ticked
Canvas Scaler
UI Scale Mode:...


Input.mousePosition to scaled canvas space coordinates

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>