Is there any event of the VR HMD height changed?(eg. player may sit down first, then stand up)

is there any event of the VR HMD height changed?(eg. player may sit down first, then stand up).
esp. for oculus quest 2.

It is not really possible to do that in a general way, since the VR systems do not know when you are at standing height.

The common way to implement something like this on the application level is to first either ask the player to stand straight and measure their height, or add a height setting. Then continuously measure the height between the HMD and tracking origin, and compare that to the recorded player height. (make sure that the tracking origin is set to the floor level)

1 Like

Thanks!

Ive experimented with this kind of method; prompting the player to stand up straight and press a button so the software can capture a height differential. Ideally Id rather have this done without the player knowing, so my solution was to add a capsule as a child of the head/camera, set it to a sensible height, and then when it hits the floor, set an IsCrouching bool to true.

The problem with using a sensible height is that humans often don’t have sensible heights.