Download

feet placement prediction

does somebody have an idea on how to implement feet placement prediction like this:
[video]https://youtu.be/29ZEvxwq_F8?t=298[/video]

Purely theory crafting here but:

  1. Estimate where the player will be by extrapolating from the current input applied multiplied by the movement rate corrected for acceleration (e.g. the player is pressing ‘goForward’, estimate where he will be in the next half second of forward movement).
  2. Do a trace from the parent socket/bone (pelvis?) of the foot in question (based on where you predicted he will be in #1) towards the projected point where the foot will land if the animation does a full cycle (you can do a more accurate trace by following the actual path of the foot in the animation cycle). Add a decal to the trace location for style.
  3. Use this information (height differential of projected and actual point of foot placement? Duration the animation needs to play for the foot to endup at that point?) to know when to terminate the foot’s downstroke.
  4. Play the upstroke animation once the point on #3 has been reached.
  5. Repeat steps 1-4 for the other foot. Project as far into the future as you desire.

Again, this is all purely theoretical. Your actual mileage may vary. Also note that your character probably needs an animation state machine for each foot for the above method to work.

thank you for the reply . i want to create a procedural animation system but stuck at stage 1.

Do you have the state machines setup? Thats a really important prerequsite.

Just hook up a function to the “goForward” input that gets deltaTime and multiply it to the character’s current speed to get the distance he will travel 1 frame in the future. The rest of it is the hard part xD

i cant use input because the character may be pushed or hit and has to maintain balance. and i want to make it completely procedural so no walk animation

EventTick then i guess. Just have the prediction on all the time. As for making it completely procedural, im not sure what you mean. I dont think you can do it in a “fully procedural” way. A really complicated state machine setup isnt exactly “procedural”. But i guess thats just semantics.

something like this:
https://www.youtube.com/watch?v=r6F3lT1v79I

Oh wow. Well that is indeed something. Hats off indeed to the guys that made that system!

Replicating that in unreal will likely take expertise in biomechanics, physics, artificial intelligence and would likely involve significant work on the engine itself to get it into an efficient and playable state. The algorithms you would need for dynamic bipedal balance alone looks like a major project in and of itself. Not to mention the need for a fully physicalized musculoskeletal system.

Are you sure you wouldn’t rather learn animation blending instead? xD

I dont intend to create something that complicated. It was just a very good example of a system.
If i could just calculate a foot placement i could move the feet there in an arc while moving the pelvis up and down.The faster the capsule moves wider the step.
I could make the hit reaction by enabling animation physics and ik.
It is possible to fake such a system but i just cant get the line trace and vector calculation to work right.
also i hate animating its alot of work and if a system would take care of some of the work it will be awesome :wink:

What exactly is going wrong with the trace and the vector math?