- Home /
SmoothDamp or Lerp with Rootmotion to match a target position
Hi there. So I know this is a bit of a longshot but I figured I'd ask anyway.
I'm having trouble finding away to make SmoothDamp (or Lerp) adjust a float in the Animator so that a character moving via root motion can stay on position of a moving target and not over shoot it. In other words, the character needs to adjust the speed of the root motion running/sprinting animation to try to keep up with the moving target. If it helps my animator's Locomotion State blendtree my thresholds are;
0.2f walk
0.5f jog
1.0f run
1.5f sprint
2.0f fullsprint
The threshold is controlled by a 'Speed' float variable and I need to adjust that so that the character will stay on target.
Hopefully that makes sense.
Is there a preferred solution to this sort of thing? I'm sure I can't be the only one that's doing this.
thanks David
Your answer
Follow this Question
Related Questions
Does SmoothDamp reach target? 2 Answers
why target switching of smooth camera not very smooth ? 0 Answers
Mouse wheel zoom 1 Answer
SmoothDamp smoothTime ignored! 1 Answer
Lerp slowing down at the end even when using the right method 0 Answers