Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
ALFREDOSKY's avatar
ALFREDOSKY
Honored Guest
10 years ago

Push button with eyes

Hi all, I am newbie in oculus/unity, recently I played a horror game and it was fantastic, one thing I wondering was the capability of push a button with the eyes, literally; I have been searching how to do it, but I do not know what is the name for, I searched words like 'eye control', 'sight control', 'look input' but nothing seems to be close, can anybody tell me how to search it, and what is the technical name, and, probably, the script that I should read? thanks in advance.

4 Replies

Replies have been turned off for this discussion
  • weasel47's avatar
    weasel47
    Heroic Explorer
    I don't think there is any standard name for this yet.

    Assuming I understand the effect you're describing, here's a slightly simplified explanation for how to do it: if the button stays centered in the view for a certain length of time, consider it pushed.

    There's not much more to it than that. You would use a raycast (that's something you can search for) every frame to determine what is in the center of the view and you would use a counter or timer to track how long it stays there.
  • weasel47 thanks for reply, I think it's a good idea use a counter, I will investigate about it and more, thanks again.