Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Oculus.Platform.Samples.VrHoops;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class grabtomove : MonoBehaviour
- {
- public GameObject L_Hand, R_Hand, XRRig;
- public Vector3 addedpos, lhandpos;
- void Start()
- {
- }
- void Update()
- {
- OVRInput.Update(); //requirement
- if (OVRInput.Get(OVRInput.Button.Any))
- {
- lhandpos = L_Hand.transform.position;
- addedpos = XRRig.transform.position + -lhandpos;
- XRRig.transform.position = addedpos;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement