Hi,
Currently developed an open and close chest scenario to loot from, the GUI pauses the game whilst the player is interacting them; however whilst the “open” animation is being played it allows the player to move freely; I want this to stop as it causes scenarios such as the player to run whilst its opening and then accessing it or crashing from afar.
Code:
private IEnumerator Open()
{
animation.Play("Open");
ParticleEffects.active = true;
audio.PlayOneShot(OpenSound);
yield return new WaitForSeconds(animation["Open"].length);
Time.timeScale = 0f;
Is there anything I can do to to A) remove player input whilst the state is “Open” or adjusting the animation?
Cheers