Skip to content
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

Gaze selector inside function_pointer (accesibility feature) #664

Closed
wants to merge 8 commits into from

Conversation

surreal6
Copy link
Contributor

This is a proof of concept to integrate a Gaze selector in function_pointer node, as an accesibility feature.

It works by adding a function pointer to the XRCamera.

may need to clean up some code, but i share it here for anyone to test it and give feedback

There is a problem with viewport2din3d, because the pointer detects the whole viewport as one element, and don't know if it is possible to detect individual items inside the viewport. I manage to solve this by limiting the pointer function to one press for each targeted element, so you need to look outside the viewport and back again inside to press a diferent element.

The release is always triggered after the press event

I added the function pointer to the XRCamera in the main scene and also in the pointer demo.

Also, there is a WIP/shead_selector_function_pointer.tscn scene with a basic demo working with XRInteractableAreas

The idea before to merge this (if approved) is to create a scene in which a decision is made from among several options.

Other idea is to add the elements from the head selector scene into the pointer demo room.

this may be a solution for #662

video_2024-07-31_09-08-15.mp4
gaze_selector_low_A_0001-0439.mp4
gaze_selector_low_B_0619-1532.mp4

@DigitalN8m4r3
Copy link
Contributor

Lgtm, nice work there

@BastiaanOlij BastiaanOlij added the enhancement New feature or request label Aug 9, 2024
@BastiaanOlij BastiaanOlij added this to the 4.4.0 milestone Aug 9, 2024
@Malcolmnixon
Copy link
Collaborator

Could you rebase to resolve the conflict - also what is the "WIP" folder - "Work in Progress"?

@surreal6
Copy link
Contributor Author

surreal6 commented Sep 7, 2024

Hi, sorry for the delay fixin this. I rebased and now the gaze selector in main menu only works with the hmd off head.

I have to look at latest commits to see what happens :P

In pointer scene works as expected

@BastiaanOlij
Copy link
Member

While still WIP it would be good to turn this into a draft PR.

Functionality is valuable but wonder if it makes more sense to make this a separate gaze_pointer scene/class you attach to the head instead of mixing it up with the current controller pointer logic.

@surreal6
Copy link
Contributor Author

While still WIP it would be good to turn this into a draft PR.

Functionality is valuable but wonder if it makes more sense to make this a separate gaze_pointer scene/class you attach to the head instead of mixing it up with the current controller pointer logic.

It makes sense. In the next days I will make a new PR

In my project i am exploring a diferent solution, i recreated the 'click on hold' feature in a traditional 2d UI, so i just need to use the pointer as is, allowing a camera parent and remoting the mouse, and without changing all the _process logic, and all the stuff detecting different ui elements is managed in the UI control nodes.

so i am thinking i will make the 'click on hold' feature optional in the new PR, to allow this other approach too.

@surreal6 surreal6 marked this pull request as draft September 20, 2024 08:38
@surreal6
Copy link
Contributor Author

I added a new pull request #683 for this functionality

@surreal6 surreal6 closed this Sep 27, 2024
@surreal6 surreal6 mentioned this pull request Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants