Analyzing speed/acceleration of moving object

Hi all,

I’m looking to gather some basic information on how I could analyze motion information from my character. I basically want my character to move his hand around (using Perception Neuron) and then calculate and record specific information about how the hand traveled.

On the screen, I’d like to have a HUD that shows instantaneous speed and acceleration. Easy to do with basic algebra and calculus, but I’m having trouble wrapping my mind around doing it real time. Should I keep a certain number of historical data points in a buffer and try to calculate the change in position over time every tick? Is there some built in mechanism in UE4 to assist with this?

The end goal is, I want the character to have their had out in front of them, then move it to the right, no faster than a certain velocity, then stop and hold for x seconds. After x second, move the hand left, again, no faster than a certain velocity, then stop and hold. The user should follow a very well defined pattern and should never exceed the predefined constraints.

At the end of the process, I would like to compare what they did with the predefined rules. IE, after the 3rd stop and hold, when the user was supposed to move their had up no faster than 6cm/s and hold at the top for 6 seconds, he/she actually moved at 8cm/s and only held for 5 seconds. I would like to actually generate a type of report based on this data.

I know you can do almost everything in blueprints that you can do in C++, but is this something better suited to implement in C++? I think I would like to keep as much as possible in blueprints, but I’m open to anything.

So I’ve found the get velocity functions in blueprints and then get the vector length. I can do this with my actor and see that the velocity is “600”. I have 2 questions about this.

1. 600 what? I know 1uu is supposed to be ~1cm. So is that 600 cm/s = 13.4 mph?
2. I eventually want to hook up a completely separate control system for my actor. My end goal is to track how fast the actor’s hand is moving in relation to his own body or the world (because during this time, the actor will be motionless). Is it possible to get the velocity of a specific bone? I was using “Get Physics Linear Velocity” and specifying the bone I want to track, but the value was always 0.

Well, for now, I’ll just keep replying to myself until I get the right answer

I did find out that the speed IS 600 cm/s. For the bone tracking, for some reason, I can get the velocity for the bone “RightHand”, but not for RightHandIndex1 - RightHandIndex4. I suppose I should note that I’m using Adam from the free MixamoAnimPack. I noticed in the physics asset, the structure only went down to the right hand. I enabled physics for the index finger bones as well, but that didn’t help. I’m still not entirely sure why I can get the velocity for the hand but not the finger. Any advice would be really appreciated!

@turick Did you end up solving your problems. I want to use velocity and acceleration from a vehicle model to drive an ATV simulator and would like to use those metrics.

Unfortunately no my project is on hiatus and I don’t plan to pick it back up until later this year when I get one of the commercially available motion controllers.