i want to make a character walk i have the animation set up and the character i have not started scripting it yet but i want to know how i can rewind to a certain frame i know how to use animation.Rewind(); but how do i rewind to a specific frame for example when the character walks the walk animation loops until i let go then i want it to rewind to the frame where he is stud still instead of just snaping there straight away. thanks
So you are about to learn that unity’s animation system is a pain in the ass
The problem is animation does not actually play when you tell it
(as far as I can understand its arbitrary when it plays)
because of this we are rather limited in what we can do with animations
in other words what you are asking is for is impossible
you cannot access the frames of an animation (when it comes to playing them in code)
However I get the feeling that your actual problem is different than what you are saying
When you import a model it brings all of its animations in as one large timeline
When you import a model you can click on it in the project heirarchy
there you can access that timeline and you can divide it up based on the FRAMES into new individual clips.
Those clips you can then play in your code whenever you want
so you can divide up your walk animations from say your punch animation
and when you play it will only play that unique clip.
I tried to find the page that explained this but its missing so heres a video