Hello.
I’m trying to have the player sit down and have a conversation. I’m using sprites unity animation 2d.
My question is, which is the best way to do this?
I managed to play the sitting down animation in front of a chair, but as soon as the player does something (interact, walk or talk) it teleports to its normal animations (which is to be expected).
1. I would like to change to a different talking animation when sitting down (sitting_down_talking or something), but can’t figure out how to do it in the sprites unity animation engine.
2. I would like to trigger a standing up animation before the character begins to walk away from his sitting down position. Can’t figure out where to do that.
Thanks in advance
Comments
I think Chris will be able to advise you more thoroughly, but:
Another option is not to lock movement at all, and simply create a transition like this: sitting_down_idle>stand_up>walk, where the first transition happens when the character's move speed float is higher than 0. The issue here is that the character is not locked in place, and clicking immediately makes the character pathfind to a different location, so the stand_up animation will play while the character is already moving. To fix this, you can attach this script to the character:
This will allow you to add an animation event to the beginning of your standing animation to make the walk speed 0, and then add another event to the end of the animation to restore the walk speed to whatever it was before.
Anyway, in short, you will need to switch to the Sprites Unity Complex engine.
While Spries Unity Complex is handy for situations like this that involve more involved animation, it shouldn't strictly be necessary.
When referencing a character that uses Sprites Unity, the Character: Animate Action's Set Standard method can be used to change the name of their idle/walk/talk etc animations. So long as you have an alternative set of animations that match the new naming convention, you can switch to them as the character sits down.