Distance Matching Locomotion : Giving it a shot!

Yep, I know how AnimModifiers works. But you still need to use animations compressed with Uniform Indexable, because after build you can’t access this curves without FAnimCurveBufferAccess and you should search two nearest values on curve and apply interpolation (or any kind of magics) to find desired value between them. It makes no sense to swap time and distance on curve, because you need to do the same in both cases to retrieve time or value. FAnimCurveBufferAccess give you a limited number of points on curve and you should use interpolation to find desired value. I know my solution is not the best, but it’s just example how to access to curve times and values. I want to adapt code from FRichCurve::Eval to this purpose.

Have you changed your mind about sharing the project files? Would be a great learning resource.

Hey guys! I’ve been trying to implement my own DistanceMatching with Paragon assets, but I’m having issues.

Once the character stop accelerating I calculate the distance between the character and the stop point. In the image it’s -106.
So having that, do I have to play the animation from the frame which matches the number (-106)? If that’s true, how can I do that? I’m little confused. Thanks in advance guys.


I’ve got the distance to the point when the player has stop accelerating but, how can I play the stop animation now? I guess my distance is a value from the distance curve and then I have to play the animation from that value. How do I convert that value in the start position of the specific animation?

You should calculate the distance every tick and get the time by this value from distance curve in animation.

I got the idea but, how can I do that? I mean in C++ or blueprint just for prototype

https://forums.unrealengine.com/development-discussion/animation/1586778-distance-matching-locomotion-giving-it-a-shot?p=1821294#post1821294

Not the best solution but it’s working

Just curious, did you guys make your physics calculations in a custom CMC and pulled the data from there in the anim graph or in a custom anim instance?

i used the default cmc and litteraly copied the calcvelocity function to use 4 prediction

Hey! Another question. Those “Evaluate Jog_Fwd_Stop” what are they suppose to do? I mean, why are they only checking one direction, in this case fwd. This happens around the entire system. Can someone explain me the concept? Thanks in advance!

They sets Stop Anim A and Stop Anim B variables in code. Just select required animation for current direction and evaluate it over time. In my solution it looks like this (for one direction):

Oh cool! I got it, but how do you transform a sequence and an explicit time into a pose for your anim graph??? Thanks!

Just drop any animation on graph and adjust settings at the right panel

■■■■ MAN, JUST RIGHT CLICK hahahaha, I’ve created a custom anim graph node trying to figure out how to do that. Thanks!!!

I see you’re using that to determine which leg is down which a perfectly good use for it, i just wanted to mention that that fwd fwd node repeating like that is misleading in the imagine but in the talk it was explained that’s for the FWD+Right or FWD+Left stops. they blend right and left depending on the angle (Stop Anim Alpha). it’s like this because stopping happens usually too fast to do any orientation warping.
Cool of you to share you knowledge in here because it’s hard to come by for this subject.

dropping my name in the hat after giving it a shot myself
starts, stops, pivot and (turn in place WIP)

Hey that’s some nice music you got there!

Haven’t posted a video in a while… Here it is !
Wondering how many time i’ve started from scratch on this project.
Still need to figure out how to smooth my transitions between states as it can be abrupt at times.

Camera from above is actually another character in first person flying without gravity, so it’s a replicated demo.

Pivot isn’t enabled in this video as i don’t have the proper animations yet:

Its kinda hard to spot if anything is sliding with just a white floor. You should use some sort of grid to showcase it.

off hand, seems like the most perfect vid in this thread.

The animations seem pretty solid. Since those are the issue 90% of the time.

Just to know… when you guys are prototyping this, your foot Ik is on and working concurrently right?

Should have added some checkerboard on the ground. Foot ik is business as usual, you can do whatever you want with it.