using UnityEngine.XR.Interaction.Toolkit.Interactables;
using UnityEngine.XR.Interaction.Toolkit.Interactors;
namespace UnityEngine.XR.Interaction.Toolkit.Attachment
{
///
/// Controls the interactor's default behavior for how to adjust its attach transform on far select.
///
///
///
public enum InteractorFarAttachMode
{
///
/// The interactor should reset its attach transform to the near point on far select.
/// This will typically result in the interactable object moving to the hand.
///
Near,
///
/// The interactor should always move its attach transform to the far hit point on far select.
/// This will typically result in the interactable object staying distant at the far hit point.
///
Far,
}
///
/// Controls how the interactor should adjust its attach transform on far select.
///
///
///
public enum InteractableFarAttachMode
{
///
/// Let the interactor decide the far attach mode. This is the default behavior.
///
///
///
DeferToInteractor,
///
/// The interactor should always reset its attach transform to the near point on far select.
/// This will typically result in the interactable object moving to the hand.
///
///
/// This value will override the interactor's preference.
///
Near,
///
/// The interactor should always move its attach transform to the far hit point on far select.
/// This will typically result in the interactable object staying distant at the far hit point.
///
///
/// This value will override the interactor's preference.
///
Far,
}
///
/// Interface queried by an interactor when selecting an interactable to override how the interactor's
/// attach transform should behave on far select.
///
///
public interface IFarAttachProvider
{
///
/// When selected because of a far interaction caster, controls how the interactor should attach to the interactable.
/// Specifically, it controls whether the interactor's attach transform should move to the far hit point
/// or whether it should stay near so the object can move to the hand.
///
InteractableFarAttachMode farAttachMode { get; set; }
}
}