I have a bird model with a Body mesh with two Feet meshes parented to it.
I want the feet to inherit the body’s local Y rotation once the body has rotated over 45º in either direction. But not inherit any X or Z rotation, and inheriting all transformation.
So essentially a parent/child relationship with no X or Z rotations, and a 45º delay on the Y rotation.
Here’s an image to illustrate what I’m aiming for:
The gray represents the Body’s local rotation between -45º and 45º. The green represents when the feet will start to rotate with the body, and I want to maintain the 45º offset when the feet do move, so they don’t snap to the body’s current rotation.
And I also want to tween the feet up and down for a cartoony walk look only while the feet are moving.
Can anyone suggest the simplest way to do this? It’s for a personal project I’ve been working on for the past few months, and I’m thinking there’s gotta be a better way than checking the Body’s rotation every frame.
I’ve tried a few methods, the best results with an If statement that went something like:
[PSEUDO]
If Body.rot >= 45 <-45
{
feet.rot.y = body.rot.y
}
[/PSEUDO]
But it doesn’t really work right as the feet are children of the body, and I have no idea how to detect when the feet are moving to tween them up and down, and, ideally, I’d like the speed of the bodies rotation to control the speed of the Feet tweening up and down, but that may be pushing it