Skip to content

Commit

Permalink
Reset IsInputDown when source is lost
Browse files Browse the repository at this point in the history
  • Loading branch information
FejZa committed Nov 9, 2023
1 parent 3ee61c1 commit 5b44420
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
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
11 changes: 11 additions & 0 deletions Runtime/Input/Interactors/BaseInteractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,17 @@ public override void OnInputUp(InputEventData eventData)
base.OnInputDown(eventData);
}

/// <inheritdoc />
public override void OnSourceLost(SourceStateEventData eventData)
{
if (eventData.SourceId == InputSource.SourceId)
{
inputDownActions.Clear();
}

base.OnSourceLost(eventData);
}

private void DragHandler(InputAction action)
{
if (IsDragging)
Expand Down

0 comments on commit 5b44420

Please sign in to comment.