godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.13k stars 86 forks source link

Need VR playspace and guardian bounds #166

Open RobKohr opened 4 years ago

RobKohr commented 4 years ago

Describe the project you are working on: A VR game similar to unseen diplomacy where the level keeps adding new paths within the playspace to explore.

Describe the problem or limitation you are having in your project: The walls, doors, etc all need to be placed dynamically inside the playspace, but all I have is ARVROrigin to tell me where the centerpoint is.

Describe how this feature / enhancement will help you overcome this problem or limitation: I could add/remove walls and pathing inside the playspace for an infinite exploration game, without any locomotion, and knowing that nothing I place will be outside of the player's reach.

Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:

+----+------+
|    |      |
|  P |      |
+--+ +--+ +-+
|       +   |
|           |
+-----------+

Player in a room in the playspace. As he moves parts of the enviornment can fall away outside of his view, and be replaced by more rooms.

Describe implementation detail for your proposal (in code), if possible: It would use a path of points for the outter bounds to provide starting lines to build walls from.

If this enhancement will not be used often, can it be worked around with a few lines of script?: Not that I can see since it needs to come from the VR server

Is there a reason why this should be core and not an add-on in the asset library?: Knowing the playspace and gaurdian bounds is pretty base level things needed for a VR game, it will have many other uses, and I don't know if it could be implemented as an add on.

aaronfranke commented 4 years ago

In addition to a path of points, SteamVR defines a rectangular safe area within the player's play area, and this would be useful to include, possibly as a Rect2 since height shouldn't matter.

BenMcLean commented 4 years ago

Unfortunately I think the different VR solutions implement this quite differently. What works for SteamVR might not work for Oculus Mobile VR for example.

BastiaanOlij commented 3 years ago

Late to the party but...

Most of the plugins now support this but each in their own way. For OpenVR for instance you can call "get_play_area" on the OpenVRConfig object.

It's been my plan for awhile now to add a core interface that plugins need to implement so you can request the boundary mesh without worrying how its implemented on that platform.