Question about Unity animatior state control

I’m trying to build up a state machine and having troubles with state transfer within Animator

I’ve written a script where

  1. it’s available to cast skill
  2. transfer occurs from any state to Skill State
  3. check conditions whether it should be transferred to NormalSkill or UltimateSkill state
  4. transfer to either Normal Or Ultimate Skill.

I’ve got my animator parameters as bool type (not trigger)
when those parameter conditions are checked, transfer occurs

I’ve tried to do this with SubStateMachine and put those states into substateMachine and this is what happened..

IDKY but entry points towards NormalSkill state…

Question #1: why is entry pointed towards NormalSkill State although I set it as Skill State before moving states into SubstateMachine?

Question #2: why are the conditions for SubStateMachine off my intention??

this is what happened

condition to escape Skill SubStateMachine is set as BattleUltimateSkill (false)

Question #3: do I have to manually switch the default state to Skill State like below??

Manually switched default from NormalSkill to Skill state

Question #4: is there a better way to build up state hierarchy?

Thanks for reading mates

  • depends on how you link them up, but in short it only shows you what you configured, if thats not what you wanted or its not doing what you wanted you need to rethink and adjust. and yes, states dont just end they usually have conditions even if they are like a 1 shot thing, it needs a return path.. and has to sit somewhere while waiting for the next thing to do

    – 

Leave a Comment