Request - get component velocity w/ physics
asked Oct 15 '18 at 03:00 PM in Blueprint Scripting
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.
Follow this question
Once you sign in you will be able to subscribe for any updates here