How to detect motion?

How can you detect if a person is sitting down or standing up in Lens Studio with spectacles?

I would start by using a script to detect the lowest plane in the scene and use that as the ground plane.

Then you can do the same for the head position. Assuming the user isn’t jumping around, you can write a script to find the highest position for the camera object (since the camera is attached to the user’s head).

One problem to solve is… how do you know if the user is sitting or standing when the lens starts? I guess you could have them do a sit / stand cycle to calibrate the effect.

Another problem is that chairs aren’t all the same height. The user might be on a bar stool, or they might be on one of those weird rocking floor chairs with the speakers in them.

In the end, I think there are too many variables to make an auto detection script. I recommend handling the solution with some input from the user so they can properly configure it.