Comments (10)
Yep, can confirm axis work now - but as you said, they're mapped weirdly.
Button situation still the same tough.
from godot_openvr.
Hey Ben,
Thanks for testing. I did do some changes yesterday and just realised I haven't commited them yet. I'll do that in the morning. I don't have controllers atm so its very possible I made a mistake. I did order some touch controllers yesterday so once they are in I can test myself :)
just have a look if you can see anything out of whack here:
https://github.com/BastiaanOlij/godot_openvr/blob/master/src/godot_openvr.cpp#L450
But note that code is about to change :)
from godot_openvr.
I don't know if you had any more time to look at things but I did commit those changes I talked about. Whether they make any difference, no idea.
fingers cross my controllers should be arriving today and I can debug this
from godot_openvr.
I didn't have time yet - but hopefully this evening I can test it.
from godot_openvr.
I haven't tested the button events yet but the axis are working for me on my touch controllers. The mapping is really weird though.
I think on the vive the trigger will probably be axis 4, not 2. I loop through 4 of the 5 axis and each has an x and y component, so x on axis 1, becomes axis 1 in Godot,
y on axis 1 becomes axis 2,
x on axis 2 becomes axis 3,
y on axis 2 becomes axis 4,
Etc.
Since the second axis on a vive controller is a trigger it only has a y which would become axis 4.
I might need to add in some more smarts and do some sort of axis mapping..
from godot_openvr.
I think this is our problem:
https://github.com/BastiaanOlij/godot/blob/master/scene/3d/arvr_nodes.cpp#L207
Should be:
bool was_pressed = (button_states & mask) == mask;
I'll try it tonight
from godot_openvr.
This seems to fix it:
from godot_openvr.
Yep, that fixes it for me too.
I thought a bit about the axis mapping issue, what do you think about using an approach similar to Godot's controller mappings?
This way we could have the buttons and axis a bit standardized, and easily add new mappings. Not sure how "similar" VR controllers are though...
from godot_openvr.
@beniwtv where you still testing this on linux? I'm planning on putting a package together this weekend, it would be nice to confirm if the linux build is now working and maybe include a build in it as well.
Btw, I don't know if you hang out on IRC/Matrix but we created a channel on freenode + room on matrix: #godotengine-vr
from godot_openvr.
Yep, was planning on testing the rumble PR sometime this weekend. As far as this issue - apart from the weird axis mapping, things work now.
Will look into Matrix (have been wanting to test it anyway).
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.