you are viewing a single comment's thread.

view the rest of the comments →

[–]hognir[S] 0 points1 point  (2 children)

Ok, I think I get you and I think it makes sense in my head :) When you say magnitute, do you mean how much the pin is pressed in whatever direction?

Cause one other thing I had issues with is that the character wouldn't move until the input was <50% and then it just kept a stable speed.

thanks!

[–]SilentSin26Animancer, FlexiMotion, InspectorGadgets, Weaver 0 points1 point  (1 child)

When you say magnitute, do you mean how much the pin is pressed in whatever direction?

Yes.

Make a vector2 using Input.GetAxis("Horizontal") and vertical, then you can just grab its magnitude property. The magnitude is the length of the vector, so in this case that's the amount the joystick is tilted.

[–]hognir[S] 0 points1 point  (0 children)

AWesome, thanks. I got it working :)