How to get the tracked head position in real world?

Hi, I want to get the acceleration of the HMD in the real world. The API localPlayer.GetTrackingData only gives the world position of the HMD, instead of the position in tracked space. I cannot get the X and Z acceleration of the HMD because the player’s position automatically aligns with the HMD position in X and Z.

Is there a solution?

Could you provide more insight as to why you need the real world acceleration of the HMD? Currently there is no way to read values from a player’s tracked space into Udon. What I assume you could do instead is manually calculate the acceleration math.
So in an update method you’d be getting the velocity by checking the change in distance the player’s head moved since the last frame, then check the change of the current velocity from the last frame’s velocity. You would then have the acceleration of the HMD. You’d probably also want to subtract the player’s movement velocity from the head velocity calculation, as that would get added on top of it, making it much faster.
There also seems to be a method to get the local transform position of a player’s bone (LocalPlayer.GetBoneTransform(HumanBodyBones tt).localPosition;), which should give you the position relative to its parent, rather than the world. I haven’t tested it yet, so I’m uncertain.
Just ask if you need further clarification on anything. Apologies if this is not the information you are looking for.

Thank you for the reply!
I made it by only using the acceleration data of the vertical axis:

Welcome to try it out!
https://vrchat.com/home/launch?worldId=wrld_d0e239d4-7aeb-4912-af59-5ca38e222830

I get the vertical tracking by using localPlayer.GetTrackingData(VRCPlayerApi.TrackingDataType.Head).position.y-localPlayer.GetPosition().y
However, this data is scaled by the ratio of player avatar height and player’s actual height. So, this algorithm works poorly on loli avatars. (but still can working)
Maybe it’s the reason why one cannot get real-world tracking: a people’s height is sensitive data.

The reason why I’d like to look into horizontal acceleration is because I want to estimate the orientation of the player’s body. So the player won’t turn if he’s looking in a direction while running in another. Right now I let players control their running direction using a joystick.

Cheers

maybe try getting the players head bone instead?

that one is always proportional to the avatars height and will cause less comparability issues.