Setting Animation on Scene Load
I am building a Top down game, in the functional style of the zelda games. I have the player transitioning from scene to scene to handle things like going inside, or changing their location wildly. I want the player to face in an appropriate direction when entering a scene (i.e. If the player entered from the Left, they should be facing towards the right of the screen).
My thought is that I could use a script to change my animator controller's start state, but I can't find how I'd do such a thing in the documentation. I could use an animator override controller, but I worry that would further complicate the rat's nest that is my code. Does anyone have any knowledge of how I'd go about doing this?
Answer by Toonk · Jul 19, 2017 at 12:20 PM
Wouldn't it be the easiest to check in the players Start() method, wether he's standing on the right or left (distance to a certain boundary say?) and then adjust its animator parameters accordingly?
Depending on what you animate, you might only have to rotate him. Depends on wether you animate rotation. If not, just let him focus a certain object every time he enters a scene.
Your answer
Follow this Question
Related Questions
Animation not playing specific bones 1 Answer
Animator solution for combining full body and masked animations. 0 Answers
Animation Not Playing 0 Answers
Mechanim animation doesn't play 2 Answers