using Unity.XR.CoreUtils.Bindings.Variables; using UnityEngine.Scripting.APIUpdating; using UnityEngine.XR.Interaction.Toolkit.Interactors; namespace UnityEngine.XR.Interaction.Toolkit.Interactables { /// /// An interface that represents an Interactable component which /// can express an interaction strength amount, which is a normalized value [0.0, 1.0] /// that describes the strength of selection. /// /// /// For interactors that use motion controller input, this is typically based on the analog trigger or grip press amount. /// It can also be based on a poke amount for how deep a poke interactor has pressed into an interactable. /// /// [MovedFrom("UnityEngine.XR.Interaction.Toolkit")] public interface IXRInteractionStrengthInteractable : IXRInteractable { /// /// The largest interaction strength value of all interactors hovering or selecting this interactable. /// IReadOnlyBindableVariable largestInteractionStrength { get; } /// /// Gets the interaction strength between the given interactor and this interactable. /// /// The specific interactor to get the interaction strength between. /// Returns a value [0.0, 1.0] of the interaction strength. float GetInteractionStrength(IXRInteractor interactor); /// /// The calls this method to signal to update the interaction strength. /// /// The update phase during which this method is called. /// void ProcessInteractionStrength(XRInteractionUpdateOrder.UpdatePhase updatePhase); } }