↧
Answer by Bunny83
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]:...
View ArticleAnswer 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...
View ArticleAnswer by citizen_rafiq
//you need two round texture one for boundary are which is bigger then 2nd texture which will //be touch and drag for controlling public class JoyStick : MonoBehaviour { public Texture areaTexture;...
View Article