Question by
renzosempai · Feb 20, 2018 at 10:52 AM ·
pause game
Player can still face every directions in idle state in paused state,How to prevent the player from facing every available directions when in pause state
The player can still face every available directions by pressing WASD keys even if the game is paused. But the player can't walk, it's just the player can face left, right, up and down. The game's top down just like Pokemon games
Comment
Best Answer
Answer by PersianKiller · Feb 20, 2018 at 02:14 PM
well there are several ways
for example if you set timescale to 0 when you pause the game
public void moving(){
if(Time.timeScale == 1){
//do move stuff or changing face .....
}
}
or you can easily deactive move component when you pause the game like this
public void pauseGame(){
MovementScript.enabled = false;
}
as I said there are several ways and these were just some examples to give you the idea
I placed a same condition you stated above on my character controller and it finally worked!!!!. Thanks for giving me the idea man.