Forum rules - please read before posting.

Make object stop animating after interacting with hotspot

Title is relatively self-explanatory. In my game, I have a panel that the user interacts with (via hotspot) to read information. Next to it is a light that flashes (via animation) that is supposed to let the player know there is something they need to do. I would like to make it so that when the player interacts with the hotspot, the light flash stops animating. I tried setting up something that does this in the Action List but I don't seem to be getting the desired output. Here is what I slapped together: https://imgur.com/8sLKSLy\

Thanks!

Comments

  • I have other objects in my scene that I would like to start/stop animating (for instance, a portal that grows after a particular action is performed from a hotspot). Is it correct for me to assume that I would handle this situation similarly to the above?

  • Your Action currently uses the "Legacy" animation engine, which refers to Unity's old Animation system, rather than the Animator system that you're probably using.

    Stopping an animation is instead a case of playing an "empty" animation. If you create a separate one-frame animation where the light flash is off, you can use the Object: Animate Action to play that animation instead of the default flashing animation.

    This time, switch to the "Mecanim" animation engine, which relies on Unity's Animator system. You can either play the new animation by name, or create a transition between the two, controlled by an Animator parameter, and use this Action to update the parameter's value. Transitions and parameters are concepts of Unity's Animator system - you can learn more about them here.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.