using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Valve.VR.InteractionSystem;
using Valve.VR;
[RequireComponent(typeof(Interactable))]
public class PlayerGrab : MonoBehaviour
{
public SteamVR_Action_Boolean _gripAction = SteamVR_Input.GetAction<SteamVR_Action_Boolean>("GrabGrip");
public SteamVR_Input_Sources _sources = SteamVR_Input_Sources.Any;
[EnumFlags]
[Tooltip("The flags used to attach this object to the hand.")]
public Hand.AttachmentFlags attachmentFlags = Hand.defaultAttachmentFlags & (~Hand.AttachmentFlags.SnapOnAttach) & (~Hand.AttachmentFlags.DetachOthers) & (~Hand.AttachmentFlags.VelocityMovement);
protected Interactable _interactable;
private void Awake()
{
_interactable = this.GetComponent<Interactable>();
}
public virtual void HandHoverUpdate(Hand hand)
{
if (_interactable.