6 [AddComponentMenu(
"UI/Extensions/VR Cursor")]
12 private Collider currentCollider;
19 thisPosition.x = Input.mousePosition.x *
xSens;
20 thisPosition.y = Input.mousePosition.y *
ySens - 1;
21 thisPosition.z = transform.position.z;
23 transform.position = thisPosition;
27 if (Input.GetMouseButtonDown(0) && currentCollider)
34 void OnTriggerEnter(Collider other)
38 currentCollider = other;
41 void OnTriggerExit(Collider other)
44 VRInputModule.PointerExit(other.gameObject);
45 currentCollider =
null;
Credit Erdener Gonenc - @PixelEnvision.