Skip to content

Instantly share code, notes, and snippets.

@JotaroS
Created May 6, 2017 14:23
Show Gist options
  • Save JotaroS/6833584a7e76784b32ee037278287f17 to your computer and use it in GitHub Desktop.
Save JotaroS/6833584a7e76784b32ee037278287f17 to your computer and use it in GitHub Desktop.
smooth tracking.
// attaching this code is more stable than OVRCameraRig/L,RHandAnchor.
using UnityEngine;
using System.Collections;
public class Touch : MonoBehaviour {
public OVRInput.Controller controller;
// Update is called once per frame
void Update () {
this.transform.position = OVRInput.GetLocalControllerPosition (controller);
this.transform.rotation = OVRInput.GetLocalControllerRotation (controller);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment