-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Controllers in demo scene #6
Comments
What I usually do is just grab the models from the OpenVR installation itself. They're just .OBJ files that Godot can read fully. Not sure of the legality of using OpenVR models for OpenHMD but for demo purposes.... :) I have to find time to get back into the OpenHMD stuff and get them compiled properly and continue working on it. The end goal is to use our own models, maybe model some hands instead of vive wands as that looks nicer in game anyway. But there are only so many hours in the day :) |
For now I'm using a meson build file that just uses all system libraries and I also had to add an ohmd context update or I didn't get any actual updates. https://github.com/ChristophHaag/godot_openhmd/commits/master I mean I could probably write the script to connect a controller node to the openhmd controllers, but it's not super obvious how, so it would need some effort... |
@ChristophHaag sorry for the late reply. I haven't been able to test any of this with OpenHMD not having controllers I've managed to get to work with it but this commented out code should result in the link up when uncommenting (provided you supply the correct device ids): It tells the openhmd driver to use that device as a controller and automatically maps it to a positional tracker in Godot. From memory, the first controller identified as the left hand controller gets positional tracker #1, the first controller identified as the right hand controller gets positional tracker #2, and anything else picks the first free entry from tracker #3 onwards. When you add an ARVRController node to your scene you simply set the controller ID to the correct positional tracker id and the controller node will automatically be positioned at the location of your controller. Obviously never having tested the code properly I don't know if anything is missing to make it work but I think Joey had it all working so I'm assuming it works :) |
Valve has recently completely overhauled their controller system so I thought godot_openhmd could be a good testcase / demo showcase until I update my stuff.
It seems there is some gdnative code to communicate with controllers, but there's nothing in the demo scene using it. Since there are no rendermodels provided by OpenHMD yet (there will be), for the time being some primitive shape would suffice.
The text was updated successfully, but these errors were encountered: