Quantcast
Channel: Answers for "joystick boundary is rectangle not cycle"
Viewing all articles
Browse latest Browse all 6

Answer by Bunny83

$
0
0
What you need is [Vector2.ClampMagnitude][1]. If you clamp the two axis seperated it will always be a rectangle ;) touchPos = Vector2.ClampMagnitude(touchPos,moveDistance); [1]: http://unity3d.com/support/documentation/ScriptReference/Vector2.ClampMagnitude.html

Viewing all articles
Browse latest Browse all 6

Trending Articles



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