I have a particle system in my VR hand and I want to modulate it’s audio based on how fast I wave my hand around.
I need to get the movement speed of my hand, or at least the movement speed of the particle system, so that I can have a float value to use. Anybody know how I can get this?
I thought maybe I could use getHandPositionAndOrientation and compare current value with last value, but I have no idea how I could do this, if somebody knows that would be amazing.
You have to integrate the speed yourself. There is no value for the velocity of the controller from what we have seen.
Even worse, at least on the PSVR, it is quite easy to loose tracking and then the position remains the same even though you are moving so the instantaneous velocity would go to zero.
So we integrate velocity in a moving average window of a short duration. Basically sum of multiple delta positions divided by the delta time for a given window.