SetKinectOrigin.cs 443 B

12345678910111213141516171819202122
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class SetKinectOrigin : MonoBehaviour {
  5. public Transform trackedOrigin;
  6. // Use this for initialization
  7. void Start () {
  8. }
  9. // Update is called once per frame
  10. void Update () {
  11. if(Input.GetKeyDown(KeyCode.Space)){
  12. Debug.Log ("Woop");
  13. transform.position = trackedOrigin.position;
  14. transform.rotation = trackedOrigin.rotation;
  15. }
  16. }
  17. }