Be the first to post for 'Gamepad Movement Mode'!

If you’re reading this, there probably aren’t very many posts yet. But don’t worry, you can be the first! Either create a new post or just reply to this one to say ‘hi’.

if (Input.GetKeyDown(KeyCode.G)){			
			isInDirectMovementMode = !isInDirectMovementMode;
			}

this was toggling twice in FixedUpdate() I had to move it to regular Update()

Thanks for sharing, do remember to use code formatting :slight_smile:

Here is an alternative to switching movement mode with G:
// Override mouse movement if there is keyboard or controller input private bool isInDirectMode() { return (CrossPlatformInputManager.GetAxis("Horizontal") != 0f || CrossPlatformInputManager.GetAxis("Vertical") != 0f); }

I’ve seen this behaviour in some RPGs and think it is quite nice.

If you do something like this you may also want to reset currentClickTarget = transform.position;

Privacy & Terms