steamvr_unity_plugin icon indicating copy to clipboard operation
steamvr_unity_plugin copied to clipboard

Does OpenVR.Chaperone.GetPlayAreaRect() return wrong points after "Reset Standing Position"?

Open plmayer opened this issue 4 years ago • 0 comments

I'm using OpenVR.Chaperone.GetPlayAreaRect() to get the actual corner points of the playspace within the Chaperone. This usually works fine, i.e. they normally line up with the (rectangle within the) actual Chaperone.

However, this works only up to the point where the user selects "Reset Standing Position" in the SteamVR menu (which they can also do in the waiting room / SteamVR home / wherever, before a game even starts).

After that, GetPlayAreaRect() returns coordinates which I've not figured out how to use yet. They are different than before, seem to define a space of the same size as before, and their center seems to be rather arbitrary (not where the user was standing, that's for sure). They are also usually partly outside of the Chaperone.

What I'm after is to get is the "realworld" Chaperone positions in Unity space, i.e. the inside-rectangle positions of the wireframe mesh shown by the compositor, regardless of what and where the user resetted. I would have thought that GetPlayAreaRect() should always show this realworld position of the Chaperone (as an example, similar Oculus API on Quest does this, ie after recenter it returns transformed Unity coordinates). But maybe I am missing some transformation API somewhere?

Edit: OpenVR.ChaperoneSetup.GetWorkingCollisionBoundsInfo() and GetLiveCollisionBoundsInfo() both return similar values as GetPlayAreaRect().

Thanks.

plmayer avatar Nov 04 '21 14:11 plmayer