I’m stuck on what seems to a fairly challenging part of my game design. I’m trying to make my player play different animations depending on what way the player is facing relative to the direction he is traveling (think angry bots). So far the only way I can think of is to set a variable that chooses that travel direction via key press (north = 0 north-east = 45 etc etc) and then take that away from the result of transform.localEulerAngles.y to work out the relative direction, ie if the variable = more than 180 degrees then make my guy walk backwards. Thus if i could set the ‘look at mouse’ position to always be 0 degrees i could sort this out easily.I have tried to pull apart the angry bots code for the solution to no avail.
I’ve looked at blend trees but i don’t seem to be able to find out if it will do what i want. Maybe I’m going in the complete wrong direction with this?
Any help would be greatly appreciated ![]()
Thanks in advance
garf