So I have an AnimationTrack for a spider AI that leaps at its target when close. The animation is in place, but I dont know what to do to make itself physically launch at its target while matching its animation. Any tips or tricks?
I’ve seen games use velocity or something that like with their rolling animations but it looks so horrible bc the way the character translates across the map doesn’t match the animation at all.
BodyForce is a good alternative to BodyVelocity as it applies a force similar to a thruster rather than forcing a linear “velocity” path to your object. Aka the object can still be pushed around.Pairing this with a removal of it shortly after can make a small boost of speed like a lunge.
Similarly, you can set the object’s velocity to a high number in the direction of attack, this also creates that affect.
If you want the attack to land in a specific place but still have a lunge affect to your attack. Body position with a high D value is a good option.
As for matching it with your animation, I guess it really boils down to how your animation is played out.
Starting the movement at a certain frame or pairing multiple of these movements can make your animation match up with the movement.
And if that doesn’t work out for you, you can even integrate “pseudo” movement into your animations themselves by moving the torso/central bit of your animation for the windup to the attack or such. (Ex: Have slight backwards movement in the animation to mimic a startup to the attack".