Search Unity

How do I make my doors uninteractable while they are animating

Discussion in 'Animation' started by ihaveadutchgf, Sep 22, 2022.

  1. ihaveadutchgf

    ihaveadutchgf

    Joined:
    Apr 3, 2022
    Posts:
    5
    I have a door in my game and if you spam interact with it while it is animating, you can break it and make it change the original close and open positions.
    I figured the best way to resolve this would be to detect when it's animating and stop the player from interacting with it while "animatingOpen/animatingClose = true", but I'm not certain how to detect this in the script
    Thanks!