jimmy tremblay-Bernier c1bf5a4ca1 initial commit
2022-03-12 22:04:30 -04:00

22 lines
546 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Valve.VR;
public class SteamInput : MonoBehaviour
{
public Bow m_Bow = null;
public SteamVR_Behaviour_Pose m_Pose = null;
public SteamVR_Action_Boolean m_PullAction = null;
// Update is called once per frame
void Update()
{
if (m_PullAction.GetLastStateDown(m_Pose.inputSource))
m_Bow.Pull(m_Pose.gameObject.transform);
if (m_PullAction.GetStateUp(m_Pose.inputSource))
m_Bow.Release();
}
}