2 using UnityEngine.EventSystems;
3 using System.Collections;
8 public InputDeviceManager.InputDeviceType getDeviceType ()
10 return InputDeviceManager.InputDeviceType.ViveController;
13 private Vector2 texCoordDelta;
16 private Camera fakeCamera;
18 public Ray createRay()
21 ray =
new Ray(this.gameObject.transform.position,
this.gameObject.transform.forward);
25 public Vector2 getTexCoordMovement()
29 public Vector3 getMovement()
34 public bool isLeftButtonDown()
38 public bool isRightButtonDown()
43 public bool isMiddleButtonDown()
50 new public void Start () {
56 InputDeviceManager.instance.registerInputDevice(
this);
57 Debug.Log(
"Vive controller registered");
60 fakeCamera = gameObject.AddComponent<Camera> () as Camera;
61 fakeCamera.enabled =
false;
62 fakeCamera.nearClipPlane = 0.0001f;
67 buttonInfo.buttonStates [ButtonType.Trigger] = triggerButtonState;
73 public Camera getEventCamera() {
77 public Vector2 getTexCoordDelta() {
80 public Vector3 get3DDelta() {
84 public void setTexCoordDelta( Vector2 delta ) {
85 texCoordDelta = delta;
87 public Vector2 getScrollDelta() {
Vector3 positionDelta
The movement of the controller since the previous frame in world space: