- Home /
Question by
unity_698766 · Apr 15, 2018 at 05:14 PM ·
2d spriteskeycodepause menu
Paused game and my sprite can still change appearance despite not being able to move
So i understand what i have done and what i need to do to fix it, the problem is how to approach it.
Basically what happened is that i followed a tutorial on how to create a pause menu. The pause menu functions normally, when paused my sprite does not move at all but changes position(looks forward when s is pressed and looks right when d is pressed).
I need a way to temporarily disable the assigned key code with the sprite phases. Any ideas how, here's the script for my sprite.
unity-help1.png
(31.1 kB)
Comment
Answer by donutLaserDev · May 02, 2018 at 11:56 AM
Well, you can do something like this:
void Update () {
if (PauseButton.gamePaused)
return;
WalkPerspective ();
Walking ();
}
It should stop the sprite from rotating.