Home Forums Software Development [Question/Help] Unity Activatable Behavior

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1994
    Dan Shelley
    Participant

    Hello to everyone here! Recently I have been working on a project that uses the EyeX SDK for Unity and had a bit of trouble getting the Activatable Behavior working on a single GameObject in my scene.

    I guess more or less I’m just having troubles understanding how to set it up for a 2D sprite game object. Essentially, I want the player to be able to activate an item in the scene using only their eyes.

    I have studied the FighterJet demo and the ActivatableGUI demo to try and implement my idea but maybe I’m just going about it wrong? So to reiterate my question, how can I set up an Activatable behavior in my 2D scene for an individual sprite? Thanks in advance, I’m having a blast developing with this hardware!

    #1995
    Robert [Tobii]
    Participant

    Hello Dan,

    Thanks for a good question. If you want to use only your eyes to activate, you should look at the GazeAware behavior instead. The Activatable behavior requires a second input, such as a button, to control when the activation should be triggered.

    You can look at the GazeAware3DScene to see how a script (GrowOnGaze, inherited from EyeXGameObjectInteractorBase) is attached to a 3D game object. I guess it should be equivalent for a 2D scene, but maybe we have missed something. Please let us know in that case.

    #2001
    Dan Shelley
    Participant

    Thanks for the quick response Robert! I have further played around with the EyeXDemos and figured out how to get the GazeAware behavior working for my project! I ended up using the EyeXGameObjectInteractorBase class for my prefabs and it’s working as expected.

    Although, lets say for a different/new prefab, I would like to use the Activatable behavior for utilizing the second input. Can I still use the EyeXGameObjectInteractorBase for this type of behavior or would I need to approach it from a different angle? Again, thanks in advance for the help!

    #2003
    Dan Shelley
    Participant

    Disregard my previous post, after tinkering around a bit and taking a closer look at the demos I was able to figure out exactly what I wanted to do!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.