most of the time, the joysticks get stuck in a corner, and don’t go back to the center of the axis.
using onscreen joystick script to emulate gamepad stick action
most of the time, the joysticks get stuck in a corner, and don’t go back to the center of the axis.
using onscreen joystick script to emulate gamepad stick action
I believe you have to try resetting the Vector3 positions back to zero in order for the joystick to recenter itself. Should be something along the lines of
public void OnPointerUp(PointerEventData eventData)
{
transform.localPosition = Vector3.zero;
moveForward = Vector3.zero;
moveRotate = Vector3.zero;
StopCoroutine(“PlayerMove”);
}
This obviously depends on what you are trying to achieve. I am currently trying to figure out how to do this from another script based on a collision parameter that re-centers the joystick instead of disabling at the last position. However for the directly linked script, that should fix your problem.