////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2007-2020 , Inc. All Rights Reserved.
//
////////////////////////////////////////////////////////////////////////////////
using UnityEngine;
namespace GCSeries.Core.Input
{
public class ZPointerInteractable : MonoBehaviour
{
////////////////////////////////////////////////////////////////////////
// Public Methods
////////////////////////////////////////////////////////////////////////
///
/// Overrides the pointer's current drag policy for this interactable.
///
///
///
/// A reference to the pointer currently interacting with this
/// interactable.
///
///
///
/// The interactable's drag policy.
///
public virtual ZPointer.DragPolicy GetDragPolicy(ZPointer pointer)
{
if (this.GetComponent() != null)
{
return pointer.UIDragPolicy;
}
else
{
return pointer.ObjectDragPolicy;
}
}
///
/// Get the interactable's specified drag plane.
///
///
///
public virtual Plane GetDragPlane(ZPointer pointer)
{
if (pointer.DefaultCustomDragPlane != null)
{
return pointer.DefaultCustomDragPlane(pointer);
}
return default(Plane);
}
}
}