Skip to content

Commit

Permalink
Merge pull request #59 from Nytra/eyeFix
Browse files Browse the repository at this point in the history
Eye tracking node fix
  • Loading branch information
Xlinka authored Nov 28, 2024
2 parents 674a0ac + 53f0c1b commit 0076a04
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions ProjectObsidian/ProtoFlux/Users/Status/IsUserEyeTracking.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using FrooxEngine;
using FrooxEngine.ProtoFlux;
using FrooxEngine.ProtoFlux.Runtimes.Execution.Nodes;
using ProtoFlux.Core;
using ProtoFlux.Runtimes.Execution;

Expand All @@ -11,7 +10,7 @@ namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Users.Status
public class IsUserEyeTracking : ValueFunctionNode<FrooxEngineContext, bool>
{
public readonly ObjectInput<User> User;
public readonly ObjectInput<EyeSide> Side;
public readonly ValueInput<EyeSide> Side;

protected override bool Compute(FrooxEngineContext context)
{
Expand All @@ -22,7 +21,14 @@ protected override bool Compute(FrooxEngineContext context)
if (eyeTrackingStreamManager != null)
{
EyeSide side = Side.Evaluate(context);
return eyeTrackingStreamManager.GetIsTracking(side);
if (side != EyeSide.Combined)
{
return eyeTrackingStreamManager.GetIsTracking(side);
}
else
{
return eyeTrackingStreamManager.GetIsTracking(EyeSide.Left) && eyeTrackingStreamManager.GetIsTracking(EyeSide.Right);
}
}
}
return false;
Expand Down

0 comments on commit 0076a04

Please sign in to comment.