Inverse Kinematics Animation in Godot (Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello there General Kobi as we already mentioned in the last video we are currently moving our Unity project to good one of the first things we need to migrate will obviously be the player itself so it would only make sense to start implementing the controls to have a functional movement system with in our game and that's why we won't do the controls for now we want to test the limits of gdau regarding its animation system at first when working in 2D you have the option to either create Sprite sheet animations or bone animations since we want to be able to later control some movements via script bone animations seem to be the way to go for us so far it looks pretty similar to unity's rigging system but for our a little experiment let's set up a quick scene in gdau luckily gdau gives us this beautiful icon to test some animations with it or of course uh you can use whatever you want to use when working with bone animations you essentially have three major options forward kinematics meaning you control every bone by a rotation beginning from the shoulder inverse kinematics here you control the chain beginning from the tip this usually is the preferred way to animate limbs like arms and legs or the third option a combination of both however it will fit your need we figured out that there are some drawbacks in gdau when trying to combine forward kinematics with inverse kinematics though let's just say you have this thing here and you want to rotate it through animations you're basically just animating the value of the angle of that object so far so good but what if you move it more than 360° if you have not set up any chain modifications in other words you're not using the inverse kinematics at all this just works the way you expect the do just lets you further increase or decrease the value to the exact value you set it so if you want to set your rotation to minus 5,000 de here you go if you transition to that from another animation though be prepared that your anim will start spinning like a windup car but if you used bone modifications on a completely different limb but within the same skeleton things tend to get weird godo then automatically overrides a value bigger than 180° and smaller than minus 180° with the corresponding value what this makes sense when you're using inverse kinematics since these values will be overwritten by the modifier anyway but without these this leads to limps moving in the complete opposite direction that you intend them to move theoretically gdau lets you set the value directly within the key frame and keep it but doing that without previewing any animation the result is just such a tedious task maybe there is a setting that we didn't find yet but to every problem there is a more or less sufficient work around and we found our own by trying to only use inverse kinematics there you save the position of the target so you will never ever face that problem the animation itself is pretty straightforward you just add properties of the nodes that you want to track and insert some key frames so basically exactly the same that Unity behaved you are able to control all public properties of every script within the parent node including every property of your custom script which is just Dam awesome you can even swap scripts within runtime and for example create Behavior scripts for certain elements we will need to experiment with that one at a different time but that might be interesting when we try to implement enemy Behavior also when you want your animation set up in a state machine that pretty much works the same as the animation controller in unity just on steroids you can set up State machines blend trees in put logic blend trees within State machines State machines within blend Trees State machines in blend trees inate machines in blend trees you get the point gdau simply doesn't limit You by some user interface in any way here and of course if you want to control your animations via script this is also possible while we are redoing the animations we also took the chance to redesign our main character I admit he's a bit more chunky but it better fits the image of a rather sloppy and grumpy but secretly warm-hearted street food chef this is also not the final result but it definitely goes in the right direction also we want to keep the possibility open to make the character customizable anyway but for now this will be our main character the cook will be called something like Freddy fetuin or Luigi lasagna or something like that maybe you have some other good ideas let us know in the comments what you think a good name for this cook will be anyway we have already done the main animations including an idle animation a running animation some jumping movement and some melee animation and of course belly and butt scratching now we only need to implement the movement controls and then we can use this character and some test levels but that will be part of another video if you want to support us check out Oakley's Adventure in the IOS app store or on Google Play Store but if you really want to support us you can purchase the ad free version thank you for watching if you like this video and want to help us create more please like And subscribe bye
Info
Channel: FiddleStone Games
Views: 28,008
Rating: undefined out of 5
Keywords: Godot, Unity, Development, Developing, C#, Engine, Game Development, Indie Developer, Indie Dev, Games, Game Developer, 2D, Animation, Game Animation, Indie, Godot Game Development, C# Game Development, Game Dev Log, 2D Game Development, Game Animation in Godot, Godot Engine Tutorial, Indie Game Developer Journey, Visual Studio for Game Development, Game Development Tips, Developing Games in C#, Bone Animation, 2D Bone Animation, Godot Sprite Animation, Skeleton
Id: ZmXrgjX-v78
Channel Id: undefined
Length: 6min 18sec (378 seconds)
Published: Mon Oct 30 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.