- Home /
Unity and Tobii EyeX - Animator Controller issues.
Hi all :)
I’m looking for some help. I’ve created a button that highlights on mouseover by slightly increasing in size using an animator controller. I’d like to do the same using gaze (Tobii EyeX). I’ve set the button to be gaze aware, but when I try and set up the second script that tells it what to do (like the SpinOnGaze in the intro project) it doesn’t work…and I’ve no idea why. I’ve asked the same question in the Tobii forum but thought I’d post here in case anyone had encountered the same issue. Here is my code for the button behaviour :
using UnityEngine;
using System.Collections;
public class Focus : MonoBehaviour
{
Animator anim = Button1;
private GazeAwareComponent _gazeAware;
void Start()
{
_gazeAware = GetComponent<GazeAwareComponent>();
}
void Update()
{
if (_gazeAware.HasGaze)
{
// Get the Animator component from your gameObject
Animator anim = GetComponent<Animator>();
}
}
}
I feel like I've probably chosen the wrong method for the button behaviour... Any help would be greatly appreciated!
Your answer
Follow this Question
Related Questions
Move cursor from script (mouse.current or alternatives?) 0 Answers
Controlling cursor using a controller 2 Answers
How do you make a Main Menu that only takes Joystick input and is not affected by the Cursor 2 Answers
How can I do 2 cursors in the same screen?2 player game 1 Answer
MMD How to export model and animations to Unity as 3rd person controller? 2 Answers