- Home /
character death - In transitions settings, where is ‘can transition to self’?
I have a character in mecanim that is dying on the final frame, but it keeps repeating over and over again as I just want it to die once and then stay down. Other answers on here have said all you need to do is turn off looping in import animations which is fine, and also untick ‘can transition to self’ in the transition settings. I cant see any ‘can transition to self’ tick box…all I see in transition settings are…exit time, fixed duration, transition duration etc….any idea where this is? maybe the animation needs to have root-motion? (mine moves with a script), maybe it’s featured in older versions of unity? maybe its just in the pro version? thanks.
Answer by bpaynom · Mar 07, 2019 at 01:55 PM
Answering your question , Can Transition to Self only appears when you make a transition from "Any State" to some state.
On the other hand, make your your animation has Loop time set as false, so the animation won't repeat when it stay in the same state.
Hi, Thanks. In import animations I have turned off ‘looptime’, but on its own this will not work, it’s meant to work if ‘can transition to self’ is also turned off in transition settings. Which does not show up for me. (according to this post)
I am trying to do this without writing any more code snippets…which is what I understand you to mean by saying….’make your animation have looptime set as false…’?
Can you share some pics of your Animator and the transition you say you can't see the option?
By itself, if your state does not transition to another state, it will:
Loop if your Animation has turned on Loop time
Stops if your Animation has turned off Loop time
So , if you have turned off Loop time , then, the problem is in your animatior or the script controlling the animator. Share it.
Answer by Patrk · Mar 07, 2019 at 06:49 PM
I read in another post that all u had to do was turn off looptime and uncheck 'can transition to self' in transition settings, looptime is turned off and here is a grab for the transition settings, am I in the right place? can't see the 'can transition to self' at a ll. if there is another way to make the dead animation stay down after 1 frame thats ok.
Answering your question , Can Transition to Self only appears when you make a transition from "Any State" to some state.
So you can only see that option in a transition from the cyan color state to another state. If you think about it, it has no sense to put a "Can transition to self" into a transition from A to B, because A is the unique origin of that transition, and A is not B.
But Any State is different. It tells that can transition from any state to the state you make the transition, so if you make a transition from Any State to Death State, you'd transition from whatever state you're to the Death State if the condition triggers. That means you could transition from Death State to Death State if you make a transition from Any State to Death State, the condition triggers, AND Can transition to self's checked.
Regarding your image, You have no transitions from your Death State to another state. That means you can't transition to Self nor other state.If you have your animation Loop time checked off, the only way i guess you could repeat that state is from code.