Jump to content



Recommended Posts

Why not use the starting code which tracks feet and hip placement that is supplied by Vive in combination with a device that keeps you in one place?


I know the second part of that is a somewhat difficult engineering problem when faced with ergonomics and immersion but hear me out. 


Most treadmills now use sensors to interface with gamers as if it was a controller. This limits the number of VR games that these can interface with since not all of them can use a controller. However, all room-scale VR games do use the coordinate tracking with the lighthouses (duh). So here's the suggestion.


With vive trackers on your feet, calibrate the distance the tracker is from the floor when your foot is in contact with it (similar to how some games calibrate height). The floor "plane" is already calibrated from room setup. Now when your foot is in contact with the floor and it slides along the floor plane it grabs and moves the coordinate plane. Visually similar to how you would click and drag on your pc. This would movement would cause the relative position of the HMD to change thus moving you in whatever game environment you are in the same way you would move in normal room-scale but without your physical self moving.


A potential issue would be the chaperone walls being moved with the plane. This can be solved by having a duplicate floor plane that simply is the room plane and the plane that is grabbed and moved be the plane that the game cares about. 


If anyone has any thoughts of other issues or any suggestions, please let me know. In the future I may look into developing this more myself, but currently transitioning from college to a full-time job.

Link to comment
Share on other sites

  • 2 months later...

 I did some testing with a unity environment using vive controllers as tracking pods (no I didn't strap them to my feet). I was able get the script to work as I wanted. However, the structure would be similar to the psuedocode below. If anyone can help me with how the structure of the play area is coded or what language of code this would be best in, please comment or sent me a message.




                Duplicate the play area plane;


                Attach chaperone walls to the new duplicate plane;


                Expand size of original plane to 10m x 10m; //This can vary


                Determine which tracked objects are tracking pods; //Maybe change this to a setup


                Set floor height for pods when feet are on ground plus small offset;





                If only one pod is less than floor height plus offset {


                                Calculate vector of the difference between position of the pod when it begins touching the                                 floor and the current position;


                                Set the up and down position change to zero (too prevent excess bobbing);


                                Add vector to new play area plane position to move the plane;


                                Calculate current velocity of pod that is touching the ground;


                } else


                                Store current location of first tracking pod as the position when it begins touching the floor;


                                Store current location of second tracking pod as the position when it begins touching the                                 floor;


                                If both pods are greater than floor height plus offset { //This is for running situations


                                                Determine distance vector by multiplying velocity by deltaTime;


                                                Add distance vector to new play area plane position to move the plane;





                Store current location of each tracking pod (different from the ones in else statement);


Link to comment
Share on other sites

  • 8 months later...

Update to attempts to do this so that it integrates with any game:


I was able to create a test code in Unity/C# to update the play area position based on the movement of a controller under a specified height.


The section of code that did this is below:


var standingPos = new HmdMatrix34_t();


OpenVR.ChaperoneSetup.GetWorkingStandingZeroPoseToRawTrackingPose(ref standingPos);
// Change values of standingPos to whatever you want, add an offset or whatever.
standingPos.m3 += positionChange.x; //positionChange is the difference in position between when it went below the determined height and the current position.
standingPos.m11 += positionChange.z;
OpenVR.ChaperoneSetup.SetWorkingStandingZeroPoseToRawTrackingPose(ref standingPos);


Unfortunately (but I should have expected this), the "CommitWorkingCopy" call caused the play area to reload. Which means the screen will flash grey each time it does this or in this case about 90 times per second. Just a little disorienting.


Next thing to try is to add an offset to the positioning of the headset itself. So whatever the number is for x and z being received, add an offset that accumulates according to the movement algorithm. I actually got this idea from when my controllers were losing tracking and "wandering off". As I am not an expert coder this will take time to research and attempt. Unless someone knows offhand how to do this!

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...