Hi there,
I was wondering if there is a method/node to get the velocity of a non-simulating physics component (ie moving along a spline of through blueprints) ? I think this would be a great addition to make to UE.
Getting that velocity using Blueprints during a timeline is quite a mess (I can’t even get there).
I dont know a built in way but if you keep track of the previous few positions, take the average of their differences and the curent position’s difference to that over a few frames, then I think that would be a good estimate of the current velocity.
You could do that using an array of vectors which pops the oldest one off whenever it pushes the newest one on, after reaching the right size(probably 3 or 4 slots)
Oh and don’t forget to account for delta time.
Yes that is an option. However I think a simple node would be glad, since such a node exists for simulating objects (and your setup probably would work with simulating objects too).
However I never managed to get a precise result with a similar setup during a timeline (see Get speed of a skeletal mesh moving along a spline - World Creation - Unreal Engine Forums), and a simple node would avoid many errors…