Skip to content

Fix for: "EyeTrackingTarget not triggering OnLookAway when passing from collider with EyeTrackingTarget to collider without"#10127

Merged
keveleigh merged 1 commit into
microsoft:mainfrom
Walkramis:main
Jul 30, 2021
Merged

Fix for: "EyeTrackingTarget not triggering OnLookAway when passing from collider with EyeTrackingTarget to collider without"#10127
keveleigh merged 1 commit into
microsoft:mainfrom
Walkramis:main

Conversation

@Walkramis

@Walkramis Walkramis commented Jul 30, 2021

Copy link
Copy Markdown

Overview

Fixes #10106

Changed assignmnet in accordance to variable documentation:
"GameObject eye gaze is currently targeting, updated once per frame. null if no object with collider is currently being looked at."
Previous behaviour only changed variable if gameobject that was hit had an EyeTrackingTarget attached, if no collider was hit it was set to null and if a collider was hit on a gameobject that did not have any eyetrackingtarget then it was not updated.
Documentation specifies it should be the "GameObject eye gaze is currently targeting", and not anything relating to if it has eyetrackingtarget or not. Not sure if intention is/was for it to be null if the gameobject does not have eyetrackingtarget, but then documentation as well as code should be updated for this.

Changes

Added on line 264 of EyeTrackingTarget.cs
LookedAtTarget = hitInfo.collider.transform.gameObject;

Removed from line 264 of EyeTrackingTarget.cs

if(LookedAtEyeTarget != null)
{
    LookedAtTarget = LookedAtEyeTarget.gameObject;
}

"GameObject eye gaze is currently targeting, updated once per frame. null if no object with collider is currently being looked at."
Previous behaviour only changed variable if gameobject that was hit had an EyeTrackingTarget attached.
@keveleigh

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 2 pipeline(s).

@keveleigh keveleigh merged commit ce07e59 into microsoft:main Jul 30, 2021
@polar-kev polar-kev added this to the MRTK 2.7.3 milestone Nov 22, 2021
keveleigh added a commit to keveleigh/HoloToolkit-Unity that referenced this pull request Dec 7, 2021
Fix for: "EyeTrackingTarget not triggering OnLookAway when passing from collider with EyeTrackingTarget to collider without"
keveleigh added a commit to keveleigh/HoloToolkit-Unity that referenced this pull request Dec 7, 2021
Fix for: "EyeTrackingTarget not triggering OnLookAway when passing from collider with EyeTrackingTarget to collider without"
keveleigh added a commit to keveleigh/HoloToolkit-Unity that referenced this pull request Dec 7, 2021
Fix for: "EyeTrackingTarget not triggering OnLookAway when passing from collider with EyeTrackingTarget to collider without"
keveleigh added a commit to keveleigh/HoloToolkit-Unity that referenced this pull request Dec 7, 2021
Fix for: "EyeTrackingTarget not triggering OnLookAway when passing from collider with EyeTrackingTarget to collider without"
keveleigh added a commit to keveleigh/HoloToolkit-Unity that referenced this pull request Dec 7, 2021
Fix for: "EyeTrackingTarget not triggering OnLookAway when passing from collider with EyeTrackingTarget to collider without"
keveleigh added a commit to keveleigh/HoloToolkit-Unity that referenced this pull request Dec 8, 2021
Fix for: "EyeTrackingTarget not triggering OnLookAway when passing from collider with EyeTrackingTarget to collider without"
@traianlavric

Copy link
Copy Markdown

this is not fixed in 2.8.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EyeTrackingTarget not triggering OnLookAway when passing from collider with EyeTrackingTarget to collider without

4 participants