- Home /
Moving Game Object large distances while animating
I'm currently trying to learn how animations and physics work and have spent 11 hours in the past two days banging my head against the wall stuck on how to figure this out so hopefully someone can point me in the right direction.
So here's the goal: I am currently trying to make an ability that sends the game object (a character) up in the air followed by a diagonal decent towards the ground, landing on one knee. Picture one of the Thor landing scenes from the Marvel movies or a Galio Ult from League of Legends. I'm sure there are other examples I can't think of.
So Far when I try to mix rigid body add force with the animation (even with no root Transformations or root Rotations) the physics is canceled out by the animations. If I try to have a parent object for movement and the character for animation it works better but the character sinks through the ground. If I just used animations I'm not sure it would dynamically change how far the character needed to descend before it collides with the terrain.
Answer by DawdleDev · Jul 09, 2018 at 06:45 PM
There are things that you can and can't use animation for. This is a bit in between. First, you really want to control the large distance through code, especially if the distance to the ground ever varies (IE if your terrain isn't an absolutely, perfectly flat plane). Then, you'll want to control the character's shape with an animation, combined with a foot IK of some sort and a script that triggers the animations when the character reaches certain points in his position, such as reaching the peak of his flight up or slamming into the ground. Basically, you want to forget animating the leap entirely, UNLESS it's for something like a cutscene or a movie, in which case EVERYTHING would be animated.
From a players perspective having an animated leap would feel pretty flat though, right?