https://developer.oculus.com/documentation/unity/unity-isdk-getting-started
Getting Started with Interaction SDK | Oculus Developers
developer.oculus.com
https://developer.oculus.com/documentation/unity/unity-isdk-create-hand-grab-interactions/
Create Grab Interactions | Oculus Developers
developer.oculus.com
LeftHandAnchor와 RightHandAnchor에만 붙여서 사용하면됌
핸드트래킹 설정
OVRHandPrefab 설정
큐브 설정
VR 버튼
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class TestMain : MonoBehaviour
{
[SerializeField] private TMP_Text debugText;
public string output = "";
public string stack = "";
void OnEnable()
{
Application.logMessageReceived += HandleLog;
}
void OnDisable()
{
Application.logMessageReceived -= HandleLog;
}
void HandleLog(string logString, string stackTrace, LogType type)
{
output = logString;
stack = stackTrace;
debugText.text = stack;
}
// Update is called once per frame
void Update()
{
// returns a float of the hand trigger’s current state on the left controller.
var privmaryRHandTriggerVal = OVRInput.Get(OVRInput.Axis1D.SecondaryHandTrigger, OVRInput.Controller.RTouch);
if(privmaryRHandTriggerVal > 0)
{
Debug.Log(privmaryRHandTriggerVal);
}
}
}