- Изменено
character walks, i see that it slides ..
Hello.
Sorry for a lot of questions lately.
I made a walk cycle animation on spine.
And using the basic platformer to move the character, we did it in Unity.
However, when the character walks, we see that it slides and walks.
How can I prevent my feet from slipping on the ground in Unity?
I'm very sorry, but since I'm a spine animator, it wasn't easy to find this method.
Even if you are not an employee of Esoteric, I would be grateful if anyone can give me an answer.
ps) And I wonder if the assets sold by Esoteric include these examples and scripts.
Hello!
If your character's feet slide when walking, that means there is a mismatch in the speed of the walk in Spine compared to Unity.
This could be the overall speed of the walk or maybe the feet only slide and go too fast in some frames.
So how can we figure out the speed?
I find that there are two useful techniques to do this:
One consist in using the X Offset available in the Ghosting view:
Ghosting view - Spine User Guide: Offset
It works by establishing the amount of offset as the constant speed the character will have in game. The animation is calibrated to not slide in this case and once this speed is matched in game the feet won't slide if they don't slide in the editor.
The second one is a personal favorite because it allows for several tricks to speed up the walk creation. And it can still be used in combination with ghosting, just with no offset.
This second technique consists in offsetting the whole character through a parent bone, which can be the root or a bone specifically made for the task as a container for example.
It works by keying the container bone translation on frame 0 where it is. Then at the end of the animation (for convenience I generally make walks last 30 frames so that I know the speed after one second) offset that same bone horizontally so that a constant speed like the one you may get in game can be simulated.
Because doing this makes you see the character moving as you would see it in game, I find that it is very helpful in crafting nice walks.
To see the character walking in place you'll just have to delete those two keys on the container bone. This is also what has to be done at the end of the animation process so that the walk can actually be used in game. Just remember to take note somewhere of the expected offset for that bone in case you need to set it again in the editor or apply it in game!
A second really nice advantage is that you can eliminate sliding feet and animate the correct feet placement extremely quickly by copying and pasting the transforms of the bones that belong to the feet.
Tools - Spine User Guide: Copy/paste
It's probably easier to just see how it works in the links below for this one.
You can see me use this technique from start to finish to animate a quadruped walk here:
https://www.youtube.com/watch?v=mMrHX3kN3bI&t=483s
Here's a second example on a stream on twitch using this technique:
https://www.twitch.tv/videos/913846615?collection=HaNLk5dAUhZVpA
Erika, thank you for your valuable reply.
I will have to practice a little more with the method you told me, but it is a very difficult and labor intensive task.
I think it would be great if something magical like Maya's script could happen at once in the Unity engine, but I'd like to find a way to do that.
This is what Maya does.
Is there a simpler way to do a non-slip walking animation using Spine and Unity?
Thank you for your reply as always.
I have watched the video, but I unfortunately don't speak Korean, couldn you be so kind to explain a little bit better what does the script do?
(also is it a script or something native to Maya?)
From what I could see, the person sort of does my method 2: establishes the two points, and then a script seems to space out the walk.
We don't have a script to space out the walk but I think adjusting the feet is as easy as the person does in the video, as it only requires a fast copy-paste of feet if you already have a walk like in this case.
Am I right or is there a major difference that I haven't considered?
I watched Erica's video, and since I'm a foreigner, there is a language barrier.
The video I linked to is a program used as a plug-in in Maya.
After creating a walk in place, you can use this plugin to hold your feet in place as you move.
We are manually giving each foot movement value to do this in the spine.
So, I was wondering if there is any other script that acts like a Maya plug-in to hold the feet when exported to the Unity engine.
When I saw the video of the asset sold by Esoteric Software, the character's feet did not slip, so I wondered if there was a plug-in, script, or component to hold it separately.
I'm sorry that the writing is not smooth because I use a translator.
Thank you for always.
Did you read about the ghosting X offset here?
Ghosting view - Spine User Guide: Offset
It's not hard, it works looks like this: set some X offset and look:
Loading Image
See where all those blue and red feet touch the ground? When they don't all hit at the same foot strike position like this, it means the feet will slide at that X offset. Change the X offset until they hit in the same place:
Loading Image
That X offset is what defines the speed (in pixels per frame) that the character needs to move to have feet that don't slide. It gives you the exact speed you need to use at runtime, though you may need to convert it to other units.
If you know the runtime speed, then you can use that to set the ghosting X offset. You then can scale your animation to be shorter or longer until the ghost feet all hit in the same place
boom, no sliding feet and you're done.
Oh Nate's explanation is very intuitive.
I will study this method.
Thanks for the very detailed reply and screenshots.
ps.
I am studying unity. Because in our project, the client programmer doesn't understand the Spine & Unity runtime.
They need someone to understand, and that's the structure that I have no choice but to be. sad but there is no way
So I study in various ways, and I find many problems while studying.
Based on what I have studied, I am making educational videos for users in a similar situation to me (animators who only know how to use Spine).
There are many Spine training videos on YouTube, but there are very few videos using Spine in Unity.
But since I am an animator and not a programmer who can handle code, I have no choice but to rely on scripts and plugins already released by Unity.
I was wondering if there is a separate Unity educational video in Esoteric Software, but unfortunately it does not exist.
So, by studying and making videos, I hope that many Spine animators can handle Unity and Spine a little better.
So many questions. sorry.
Thank you very much to both of you who responded.
I'll test it soon and post good results here.
Cool, please let us know how it goes!
We've been working on a spine-unity runtime video, we should have it done in a few weeks. It's about the Timeline Extension package, so I'm not sure how much it will help. In general it's hard to make a video about coding stuff and general spine-unity usage is probably best learned via text documentation.
I made a walk along the X-axis with the information you gave me.
Make sure it doesn't slip.
I understand the content of this method. thank you very much.
However, it doesn't look completely natural.
I'll study a little more.
Great! That's wonderful progress!
Great job on figuring it out!
If it helps, maybe it can become a bit more natural if the touching point happens closer to below the head for balance?