Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Add input related apis #96

Merged
merged 1 commit into from
Apr 4, 2020
Merged

Add input related apis #96

merged 1 commit into from
Apr 4, 2020

Conversation

m4gr3d
Copy link
Collaborator

@m4gr3d m4gr3d commented Apr 1, 2020

No description provided.

@m4gr3d m4gr3d added the enhancement New feature or request label Apr 1, 2020
@m4gr3d m4gr3d added this to the 2.0.0 milestone Apr 1, 2020
@m4gr3d m4gr3d force-pushed the add_input_api branch 3 times, most recently from 5733ce9 to 82deb54 Compare April 2, 2020 00:42
Copy link
Member

@BastiaanOlij BastiaanOlij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I recently did something similar with OpenVR where I added an OpenVRHaptic class that allows us to control a haptic vibration based on its action name (We need to start talking about what the action systems mean for the platforms that don't have them but thats another topic for another day).

So I'm okay with the change itself. What I do wonder about seeing how things work here, the original haptic implementation was piggy backing on the joystick API in Godot (I've often wondered if this was a smart choice) and you can thus set the rumble properties directly on the controllers. Is this also implemented in the plugin? Should we? Or should we see this as the main way forward and eventually adding support in the core layer to implement a more cross platform solution?

@NeoSpark314
Copy link
Collaborator

I think it is implemented also in the plugin here:

void OvrMobileController::update_controller_vibration(ovrMobile *ovr, ControllerState& controller_state) {

but I have never used it so far.

@m4gr3d
Copy link
Collaborator Author

m4gr3d commented Apr 4, 2020

Thanks for the review!

As @NeoSpark314 mentions, that is also supported and implemented in the OvrMobileController class ( I need to make sure to double-check it's working as expected...).

Not having it would make the interface more complex IMO as it would then be the user's task to figure out how to map the Godot controller's rumble to the Oculus touch controller's haptics, possibly leading to inconsistency in implementations.

Since feedback is limited (sounds, visual & controller haptics), this addition is to give the ability to users to provide feedback for arbitrary game logic (e.g: reaching an objective) instead of having haptics be limited to controller related game logic (e.g: colliding with an in-game object).

If we decide to support the action systems, it should be in addition to the existing functionality, and not replacing it since IMO the current controller rumble-haptic binding is the simplest way for users to trigger haptics for controller-related game logic.

@m4gr3d m4gr3d merged commit c17fcf2 into GodotVR:master Apr 4, 2020
@m4gr3d m4gr3d deleted the add_input_api branch April 4, 2020 13:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants