Virtual On Screen Joystick: Sticking to the edge, a better way?

Greetings,

I have created a virtual joystick that works well until it reaches it’s maximum distance at which point it “Sticks” to the edge.

Is there a better way to accomplish this? I have added an example below of it sticking, I’d like to to “flow” down/up when the mouse/touch is pulling outside of its boundary.

The joy stick part is a the Draggable behavior.

Example: https://i.gyazo.com/068c9625f01b16da32fa003901ec603e.gif

How I am keeping it within the boundary: https://i.gyazo.com/160bae37e1de497b6635ea3055b7140d.png


Thanks!

1 Like

Exactly what I was looking for weeks. Thanks man!