i made a virtual joystick that uses the physics behavior to shoot the character to the opposite direction you dragged the joystick, but it doesn't have a limit, you can drag the button across the entire screen and launch it to the other side of the screen
Develop games in your browser. Powerful, performant & highly capable.
Put your distance() expression inside a min() expression like so...
min(distance(a,b),y) where y is the maximum you want. The min expression will take the smaller of the two numbers.