NeoSpark314 / godot_oculus_quest_toolkit

An easy to use VR toolkit for Oculus Quest development using the Godot game engine
MIT License
367 stars 38 forks source link

Animated/Reactive Controller #54

Closed neoxid501 closed 3 years ago

neoxid501 commented 3 years ago

A friend of mine added responsive buttons on the controller models on to a toolkit he was making for Oculus Headsets in Unity, and I felt like it would be a welcome addition to this toolkit.

Why?

Part of what sells the immersiveness of VR is the small touches: considering the controller is something that the player is physically holding and can see in the virtual space (assuming it isn't replaced by the user) helps keep the player engaged.

Many games are likely to use the default controller anyway, so providing a responsive option that has the above benefit, as well as having the added benefit of visually confirming that button presses are being registered when debugging in my mind make this a valuable addition.

How

Aside from needing to reimport assets (these changes my be discarded) I only added scenes and models.

I recognized the file size discrepancy between the solid controller and when I separated the buttons, ultimately deciding to create separate scenes for the reactive controllers so that anyone looking to squeeze out as much performance of their quest as possible could do so by using the non-reactive controllers.

The reactive controllers have their own separate models and their own separate scene. I extended the existing script for the controllers and animated them based on the inputs in the vr autoload. Note that the controllers will not respond to simulated button presses.

Edit: I would also like to point out that I replaced the default controllers in the UI Test Scene with the reactive ones but none of the other scenes.

NeoSpark314 commented 3 years ago

Awesome! This is a really great addition to the toolkit. Thanks also for making this behaviour optional.

One thing: you accidentally added the derived files in demo_scenes/data/models_3d/medieval_weapons_pack/ (all the .material and .mesh files) they were not part of the repo previously as they get generated on import of the weapons pack gltf file. Can you remove them from this PR? Then we can merge it.

Wavesonics commented 3 years ago

Awesome work! I've been wanting this for a long time!

neoxid501 commented 3 years ago

Awesome! This is a really great addition to the toolkit. Thanks also for making this behaviour optional.

One thing: you accidentally added the derived files in demo_scenes/data/models_3d/medieval_weapons_pack/ (all the .material and .mesh files) they were not part of the repo previously as they get generated on import of the weapons pack gltf file. Can you remove them from this PR? Then we can merge it.

So I did!

Just removed them.

edit: Was going through the changes and noticed I accidently removed one of the tabs on an enum while I was looking at the VR Autload script so I reverted that change as well.