Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Using an Animator State as a Switch with no Animation

Discussion in 'Animation' started by minoush82, Feb 11, 2022.

  1. minoush82

    minoush82

    Joined:
    Aug 24, 2021
    Posts:
    4
    Hi,

    I have the attached portion of a sub-state machine in my animator. The parent layer is connected to the states "Standing" and "Prone Idle" using transitions with conditions "isStanding == true" and "isStanding == false" respectively. Things work fine.

    I, however, do not like the multiple transitions invading the sub-state machine, and I want to enter the sub-state machine at "Entry" and leave it at "Exit". So I thought maybe I can add a state "Stance Switch" that will forward the condition variable "isStanding" to both "Standing" and "Prone Idle". This works in the sense that it allows me to get rid of the invading transitions, but the animated object will briefly go to T-Pose when the animator is playing "Stance Switch" because there is no animation attached to it.

    I do not want the state "Stance Switch" to play any animation or make the animated object go to T-Pose. Is this possible? Is there something I can do to make the state a pure Switch that changes nothing about the animated object's animation?

    Cheers.
     

    Attached Files: