Comments (5)
Sorry for the very very late reply.
The viewport not returning to a normal viewport after ARVR is turned off sounds like an issue in Godot itself, it is supposed to adjust the size and everything automatically.
What do you mean by uninitialising and re-initialising? If you uninitialise the interface that shuts down openvr completely and is very wasteful. Or do you simply mean switching which viewport is set as the ARVR viewport?
You can't have more then one viewport set as the ARVR viewport at any given time so if removing the ARVR status on a viewport is causing issues that might result in problems.
from godot_openvr.
No worries!
Make sense - I'll report the viewport size issue to Godot.
I can see how it's wasteful, but I think it might still be sensible in our case: Our program is usually controlled traditionally with mouse and keyboard, VR is only turned on sometimes to view the landscape from VR. It's plausible to have long times between that where VR is turned off, so that's where we'd want to uninitialize the interface. Or should we leave the interface initialized and only remove all VR nodes and ARVR viewports?
If I recall correctly, uninitializing and initializing could actually drop the FPS permanently, and there was also the crash mentioned above that happened sometimes when calling uninitialize. Would a small example project be of use, or is uninitializing not really something we should do anyways?
from godot_openvr.
Hi. have you found any solutions? I'm having same issue. After switching arvr to false image gets distorted/stretched... :(
from godot_openvr.
@milmarg Unfortunately not... also, it seems like OpenXR in Godot 4.0 assumes even more strongly that VR is either consistently enabled since startup or consistently disabled (see https://docs.godotengine.org/en/latest/tutorials/xr/setting_up_xr.html#openxr). So it seems like the only workaround is to make a full restart for enabling/disabling VR as painless as possible (this is what we ended up doing).
from godot_openvr.
I found a workaround: bumping the viewport's size around seems to fix it (desktop Windows, Android native, web). Running 3.5.1.
Here is my full exit vr method (verified working in 3.5.3 also):
func exit_vr():
var interface = ARVRServer.find_interface("Native mobile")
interface.uninitialize()
get_viewport().arvr = false
$"%Camera".current = true
# hack to get 2D viewport to return to normal...
var vs = get_viewport().size # get the actual size
get_viewport().size = vs - Vector2.ONE # bump it (make something refresh?)
get_viewport().size = vs # restore it to the actual value
vr_active = false
from godot_openvr.
Related Issues (20)
- Black Screen (in HMD) when using GLES2 with OpenVR HOT 2
- Controller pose lag: `GetDeviceToAbsoluteTrackingPose` and `fPredictedSecondsToPhotonsFromNow` HOT 1
- [Feature Request] Add support for dashboard overlays HOT 4
- Problems with ARVROrigin movement [Godot 3.3] HOT 11
- Change how our release zip file is put together HOT 3
- Trying to set "action_json_path" results in Error HOT 5
- When to prefer OpenVR over OpenXR HOT 2
- No support for trackpad in WMR HOT 1
- Rendering in headset breaks after moving window HOT 9
- Cannot differentiate the trackpad and joystick on Valve Index Knuckles HOT 1
- Need help with step rotation HOT 1
- Delay between head tracking and scene render
- do not use openvr module in godot latest version
- Aligning spatial nodes with real world objects
- `keep_3d_linear` causes the output to be too dark on Linux HOT 4
- Exposing skeleton finger data.
- Godot crashes when I load the project. HOT 1
- is project still updated?
- Cant find where a print massage is coming from in the console
- "Using OpenVR overlays" Are there any related tutorials or examples available? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godot_openvr.