Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix: Track pointer down and raise pointer up on previously downed targets #98

Merged
merged 12 commits into from
Nov 10, 2023
103 changes: 27 additions & 76 deletions Assets~/StandardAssets/Interactors/FarInteractor.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1247086986094436}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &6863193991115524521
MonoBehaviour:
Expand Down Expand Up @@ -162,12 +163,9 @@ MonoBehaviour:
id: 4
description: Pointer Pose
axisConstraint: 7
cursorPrefab: {fileID: 1000012072213228, guid: 79f96834fcc44889b558cc13518979a0, type: 3}
disableCursorOnStart: 0
uiLayerMask:
serializedVersion: 2
m_Bits: 32
setCursorVisibilityOnSourceDetected: 0
raycastOrigin: {fileID: 0}
activeHoldAction:
profileGuid: 00000000000000000000000000000000
Expand All @@ -186,45 +184,17 @@ MonoBehaviour:
axisConstraint: 2
requiresHoldAction: 0
enablePointerOnStart: 0
interactionMode: -1
nearInteractionCollider: {fileID: 0}
overrideGlobalPointerExtent: 0
defaultPointerExtent: 10
overrideGlobalPointerExtent: 0
pointerOrientation: 0
lineColorSelected:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 0}
key1: {r: 0.8490566, g: 0.8490566, b: 0.8490566, a: 1}
key2: {r: 0, g: 0, b: 0, a: 1}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 3277
atime2: 49151
atime3: 65535
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_NumColorKeys: 2
m_NumAlphaKeys: 4
lineColorValid:
cursorPrefab: {fileID: 1000012072213228, guid: 79f96834fcc44889b558cc13518979a0, type: 3}
disableCursorOnStart: 0
setCursorVisibilityOnSourceDetected: 0
defaultLineColor:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 0}
key1: {r: 0.14122522, g: 1, b: 0, a: 1}
key2: {r: 0, g: 0, b: 0, a: 1}
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
Expand All @@ -239,20 +209,21 @@ MonoBehaviour:
ctime6: 0
ctime7: 0
atime0: 0
atime1: 3277
atime2: 49151
atime3: 65535
atime1: 65535
atime2: 0
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_ColorSpace: -1
m_NumColorKeys: 2
m_NumAlphaKeys: 4
lineColorInvalid:
m_NumAlphaKeys: 2
lineColorInputDown:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 0}
key1: {r: 1, g: 0, b: 0, a: 1}
key0: {r: 0, g: 0.9806142, b: 1, a: 0}
key1: {r: 0, g: 0.9806142, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 1}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
Expand All @@ -276,37 +247,9 @@ MonoBehaviour:
atime6: 0
atime7: 0
m_Mode: 0
m_ColorSpace: -1
m_NumColorKeys: 2
m_NumAlphaKeys: 4
lineColorNoTarget:
serializedVersion: 2
key0: {r: 0.754717, g: 0.754717, b: 0.754717, a: 0}
key1: {r: 0.754717, g: 0.754717, b: 0.754717, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 3277
atime2: 65535
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_NumColorKeys: 2
m_NumAlphaKeys: 3
lineColorLockFocus:
serializedVersion: 2
key0: {r: 0, g: 0.9806142, b: 1, a: 0}
Expand Down Expand Up @@ -334,6 +277,7 @@ MonoBehaviour:
atime6: 0
atime7: 0
m_Mode: 0
m_ColorSpace: -1
m_NumColorKeys: 2
m_NumAlphaKeys: 4
lineCastResolution: 2
Expand All @@ -342,6 +286,7 @@ MonoBehaviour:
- {fileID: 1526809385130449531}
--- !u!120 &3080660041806603478
LineRenderer:
serializedVersion: 2
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
Expand All @@ -351,6 +296,7 @@ LineRenderer:
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 0
m_StaticShadowCaster: 0
m_MotionVectors: 0
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
Expand Down Expand Up @@ -451,16 +397,20 @@ LineRenderer:
atime6: 0
atime7: 0
m_Mode: 0
m_ColorSpace: -1
m_NumColorKeys: 2
m_NumAlphaKeys: 4
numCornerVertices: 8
numCapVertices: 8
alignment: 0
textureMode: 3
textureScale: {x: 1, y: 1}
shadowBias: 0
generateLightingData: 0
m_MaskInteraction: 0
m_UseWorldSpace: 1
m_Loop: 0
m_ApplyActiveColorSpace: 0
--- !u!114 &1526809385130449531
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -501,6 +451,7 @@ MonoBehaviour:
atime6: 0
atime7: 0
m_Mode: 0
m_ColorSpace: -1
m_NumColorKeys: 2
m_NumAlphaKeys: 4
lineWidth:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: DefaultPointerLine
m_Name: FarInteractorLine
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _ALPHABLEND_ON _BORDER_LIGHT_USES_HOVER_COLOR _DISABLE_ALBEDO_MAP
_GLOSSYREFLECTIONS_OFF _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A _SPECULARHIGHLIGHTS_OFF
Expand Down
2 changes: 1 addition & 1 deletion Runtime/BoundaryService/Interfaces/IBoundaryService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace RealityToolkit.Boundary.Interfaces
/// The interface for a Boundary system in the Reality Toolkit
/// All systems for providing Boundary functionality should derive from this interface
/// </summary>
public interface IBoundaryService : IService
public interface IBoundaryService : IRealityToolkitService
{
/// <summary>
/// Event raised when a tracked object nears, or crosses the boundary.
Expand Down
12 changes: 12 additions & 0 deletions Runtime/IRealityToolkitService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) Reality Collective. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using RealityCollective.ServiceFramework.Interfaces;

namespace RealityToolkit
{
/// <summary>
/// A <see cref="IService"/> scoped to the Reality Toolkit.
/// </summary>
public interface IRealityToolkitService : IService { }
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions Runtime/IRealityToolkitServiceModule.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) Reality Collective. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using RealityCollective.ServiceFramework.Interfaces;

namespace RealityToolkit
{
/// <summary>
/// A <see cref="IServiceModule"/> scoped to the Reality Toolkit.
/// </summary>
public interface IRealityToolkitServiceModule : IServiceModule { }
}
11 changes: 11 additions & 0 deletions Runtime/IRealityToolkitServiceModule.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Runtime/Input/Cursors/BaseCursor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ protected virtual void UpdateCursorTransform()
// Use the lerp times to blend the position to the target position
var cachedTransform = transform;

if (Pointer.IsFocusLocked && focusDetails.CurrentPointerTarget != null)
if (Pointer.IsFocusLocked && focusDetails.CurrentTarget != null)
{
if (Pointer.SyncedTarget == null)
{
Expand Down
Loading