Procedural Animation School #1: You gotta rotate before you can walk.
Procedural animation. Most people think of spiders and a lot of legs. This is one part, but I would say transforming physical forces into rotations is even more important & a good start > Thread >
The rig is super simple and entirely done with empty gameObjects acting as bones and primitives parented under these "bones"
These are the global variables we need.
You see there a serializable class called AnimatedPart, that is what we will use to animate our body parts.
We will use velocity (Rigidbody in this case) and yawdelta (difference between current rotation.y and last rotation.y).
This is the logic used to animate the figure. I have separated character controller rotation and visuals rotation. This is something I find is very useful.
And this is my setup inside the editor.
This technique can be applied to animated characters. Just multiply procedural rotation to current bone rotation. This is not magic and you'll get the best results if the rigs are made with procedural animation in mind.
I hope this was to some use. Feel free to ask any questions! I will return with tutorial #2 in the near future where we'll set up some procedural locomotion.
Disclaimer: Any errors made in the code are intentional just to piss you off.
A softer setup. Endless possibilities!
The "look at my belly" setup.
If you make anything with this as an inspiration, or if you come up with ideas/improvements on your own, I would deeply appreciate it if you shared in DM or something :)
I saw errors. Sorry, retroactive update.
We need to add a Quaternion named startRotation to the AnimatedPart class and set that in the start. And then add the procedural rotation to that start rotation. Not needed on animated stuff since they have a set rotation per frame.
This is why im not a teacher.
Share this Scrolly Tale with your friends.
A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.