I want to move my player using my y mouse position. So if I push the mouse up, the player would move faster. If the mouse stays in the middle of the screen, the player shouldnt move, and if the mouse is under the upper half of the screen, the player should move back.Just like a throttle.
I tried to do it with the mousePosition, but it only work if my game is fullscreened, because the 0 is not in the middle of the screen, its up. Help pls ^^
All you have to do is adjust the mouse position by whatever amount you need to make it 0 at whatever position you want 0 to be. By default, the bottom of the screen is 0. If you want the middle to be 0, then simply subtract half the screen height from the mouse y coordinate to get your throttle amount.
int throttle = Input.mousePosition.y - Screen.height / 2;
You may have to do additional calculations to your throttle amount to scale it appropriate for the movement speed of your player.