How can I tell which direction as gamepad thumbstick is moved?

How can I tell if the player pushed the thumbstick up/down/left/right

1 Like

This doesnt help i’ve already read it

using the thumbsticks return X and Z values between -1 to 1
how would I define these values to up/down/left/right

1 Like

X is pointing to Right and -X is pointing to Left.
Y is pointing to Up and -Y is pointing to Down.

AXIS2

Just remember this image above^

7 Likes

If the x is 1 it’s moving to the right, -1 to the left, if the z is 1 it’s going forward, and -1 it’s going back (I might be wrong since I don’t remember). Anything in between those numbers means the pad isn’t going straight in one direction.

Why do you want to know this?

2 Likes

This graph is used in mathematical functions like Sine, Tangent, etc. It is also used in the API of Roblox for certain use cases.

1 Like

I meant what is he doing in his game that he’d want to know this, I thought maybe it was a specific problem, but nvm.

2 Likes

I’m creating a VR first person character “framework” and I needed to make it so the forward will always be where the player is facing

this is what I ended up doing to achieve this:
BV.Velocity = player.Character.HumanoidRootPart.CFrame:vectorToWorldSpace(Vector3.new(input.Position.X*20,0,-input.Position.Y*20))

3 Likes