Quantcast
Viewing all articles
Browse latest Browse all 6

Answer by Waz

Ah, given you're picture the problem is clearer - your gui boundary is smaller than you're moveDistance. You need to clip an area *inside* the rectangle - so the guiboundary needs to be at least moveDistance on its shortest side. Bunny83's answer is the way to code it, once you've checked that the touch is inside the rectangle (otherwise it will move the joystick for a touch anywhere, presumably not what you want).

Viewing all articles
Browse latest Browse all 6

Trending Articles



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