You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the SteamVR_PlayAre is set to Size = Calibrated then the vertices in the public vertices variable are reported as follows:
vertices[0] = Bottom Right Inner point
vertices[1] = Bottom Left Inner point
vertices[2] = Top Left Inner point
vertices[3] = Top Right Inner point
vertices[4] = Bottom Right Outer point
vertices[5] = Bottom Left Outer point
vertices[6] = Top Left Outer point
vertices[7] = Top Right Outer point
If the Size is set to any other specific size (e.g. 200x150) then the vertices Vector3 array reports the corners in different locations:
vertices[0] = Top Right Inner point
vertices[1] = Bottom Right Inner point
vertices[2] = Bottom Left Inner point
vertices[3] = Top Left Inner point
vertices[4] = Top Right Outer point
vertices[5] = Bottom Right Outer point
vertices[6] = Bottom Left Outer point
vertices[7] = Top Left Outer point
This causes issues if these vertices are being used to draw a Play area representation as the figures are not consistent.
If the SteamVR PlayArea `Draw In Game` option is unchecked then the
play area mesh is not generated which means anything relying on the
vertices from the mesh will not work (such as the play area cursor).
This fix ensures the `BuildMesh` method is called in the boundary
init function so it is always called at least once at runtime.
The second issue came from when the play area size was set to a
specific size other than calibrated. It seems that SteamVR puts
the vertices into a different order when using non-calibrated sizes
as can be seen in this issue on the SteamVR Github page:
ValveSoftware/steamvr_unity_plugin#25
This has been fixed within VRTK by flipping the vertices accordingly
so they are in the correct position. In the future, if Valve fix this
within SteamVR then this can be wrapped in a script define so it only
affects older versions of SteamVR.
If the
SteamVR_PlayAre
is set toSize = Calibrated
then the vertices in the publicvertices
variable are reported as follows:If the
Size
is set to any other specific size (e.g.200x150
) then thevertices
Vector3 array reports the corners in different locations:This causes issues if these vertices are being used to draw a Play area representation as the figures are not consistent.
The piece of code that dictates the manual Quad for the play area is located here:
https://github.com/ValveSoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/Scripts/SteamVR_PlayArea.cs#L66-L80
However, to have it consistent with how the Calibrated play area is set up it should be:
Example of the discrepancy in an image:
I'll also raise a PR to go with this ticket.
The text was updated successfully, but these errors were encountered: