Thumbstick on PC

So me and my friend want to make a marble game, but to make it more interesting and difficult, we wanted to control the marble by a thumbstick.

Basiclly like it is on mobile, but on PC
How would I do that?

PS: Im reffering NOT to dynamic thumbstick, just the normal one

EDIT: You control the thumbstick on PC with your mouse, and the camera with WSAD

1 Like

You’d need a Touch screen which not everyone has so, I dunno… The concept doesn’t seem to be the best.

1 Like

No, no! I mean you control the thumbstick with the mouse, and the camera with keyboard.

Use a image label, and check for mouse enter and input began. Then lock it to the player’s mouse and use clamping, then when input ended fires, return it to its original position. That’s a basic scaffold of what the code should look like.

1 Like

How would I make the joystick not go out of the bounds of the other ImageLabel?
And also how would I determine where the player should move?

Agreed. This feature could deduct player counts as it would be hard to move your camera and walk at the same time.

A thumbstick would be harder to control than a keyboard. I would recommend sticking with keys and having either the arrow keys or wasd as the movement controls.

math.clamp. You can get the position and use that in a body mover parented under your marble.

1 Like

How would I use math.clamp on a round ImageLabel though?