Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17090

Input coordinates to UI(Canvas) coordinates

$
0
0

Hello.

I want to do an onscreen joystick that will appear in touch\mouse location. (basically, when I touch\click a sprite should appear under exact finger\mouse location)

For some time I’ve been trying to do that myself, but so far I could not succeed.

What is the common approach to make touch position to correspond to canvas position? I have different results on different resolutions. I tried to change fit modes, anchor points, etc. Is there an example of how to do that?

thanks.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 17090

Trending Articles



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