Comments (7)
This bug reared its head for me with 1.1.0 of godot-openvr and godot 3.3.2, windows 10 steam version. I had to copy the actions folder to my exported exe folder to get it working.
from godot_openvr.
Cheers Ben, as we discuss we'll have a look at how the core team reacts on how this is supposed to work before we change anything on our side, especially with the viable workaround in just setting the path directly on our config object.
Bit of a nuisance this. I don't test the exports often enough.
from godot_openvr.
I really need to get back onto this, we learned some more about this but I haven't had the time to implement it.
The much bigger problem is that when exporting our game our json files get included in our gamepack file, out of reach of OpenVR.
My suggestion is that we do away with the setting all together. We should look for the config files in 3 fixed locations in order:
- check for an actions folder alongside the executable and use those (this is for release)
- else check for an actions folder in the root of our project (for custom files)
- if that doesn't exists use the actions folder in our plugin (our backwards compatible defaults)
Then we implement an EditorExportPlugin class that will grab either the json files in location 2 or 3 and export them to an actions folder alongside the executable (so end result is 1)
from godot_openvr.
For xrdesktop we compile the action and bindings manifests into the application as a resource and when running, the manifests are written to a file at the standard cache path, ${XDG_CACHE_HOME} on linux.
Though this poses the question whether to overwrite the manifest when the user edited it (we say yes because the SteamVR binding ui stores altered bindings independently of the bindings manifest).
from godot_openvr.
We successfully got things working on export builds. I'm going to document the workaround we used, though hopefully it will cease to be necessary once fixed upstream:
if ProjectSettings.globalize_path("res://") == "":
openvr_config.action_json_path = OS.get_executable_path().get_base_dir() + "/" + action_json_filename
else:
openvr_config.action_json_path = "res://addons/vr_manager/openvr/" + action_json_filename
Note: The above solution checks directly for the cause of the issue: if globalize_path fails to produce a global path, we use the base directory of the executable path.
I recommend using globalize_path here instead of checking for "standalone" or "release" platforms, as platform checks fail if you export a debug build; or if you test an export build with a editor/tools build of the engine.
It's also your responsibility to ensure that .json bindings and actions files are actually exported. Our build system takes the actions
directory from (in our case) addons/vr_manager/openvr/actions
and copies it to EXPORT_DIR/actions
, for example. This seemed to me to be far less error-prone than listing json files in every export configuration, but ymmv
Hope this helps others who run into this until fixed upstream.
from godot_openvr.
Ok I've got this working so that during development it looks for the action files in a folder called actions
in the root of your project first, and if it doesn't exist it will use the default action files it will look for the folder in the godot_openvr
addons folder.
When exporting your project it will export those files alongside your exe.
When running in runtime it will use the files alongside the exe (this is always the first place it looks even in development)
See #105
from godot_openvr.
If I recall correctly you need to enable the plugin in the plugins tab of your project settings for the export to copy over the files for you. Could remember wrong though.
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.