void Start() { marker = GetComponent <DoorDestinationMarker> (); controller = VRTK_DeviceFinder.DeviceTransform(VRTK_DeviceFinder.Devices.Right_Controller); }
// Update is called once per frame void Update() { GameObject head = VRTK_DeviceFinder.DeviceTransform(VRTK_DeviceFinder.Devices.Headset).gameObject; }
public void Start() { PlayArea = VRTK_DeviceFinder.PlayAreaTransform(); Headset = VRTK_DeviceFinder.DeviceTransform(VRTK_DeviceFinder.Devices.Headset); }
/// <summary> /// The relative position of the right controller in space. /// </summary> /// <returns>A 3-dimensional vector, equal to the right controller's relative displacement in the [0] x direction (float), [1] y direction (float), and [2] z direction (float).</returns> public Vector3 RightLocalPosition() { return(VRTK_DeviceFinder.DeviceTransform(VRTK_DeviceFinder.Devices.RightController).localPosition); }
/// <summary> /// The relative rotation of the right controller in space. Can be queried for its normalized value, eulerAngles, and w, x, y, and z components. /// </summary> /// <returns>A quaternion representing the right controller's relative conterclockwise angular displacement.</returns> public Quaternion RightLocalRotation() { return(VRTK_DeviceFinder.DeviceTransform(VRTK_DeviceFinder.Devices.RightController).localRotation); }
/// <summary> /// The transform (position, rotation, scale) of the right controller. /// </summary> /// <returns>The transform component of the right controller.</returns> public Transform RightTransform() { return(VRTK_DeviceFinder.DeviceTransform(VRTK_DeviceFinder.Devices.RightController)); }
/// <summary> /// The rotation of the left controller in space. Can be queried for its normalized value, eulerAngles, and w, x, y, and z components. /// </summary> /// <returns>A quaternion representing the left controller's conterclockwise angular displacement.</returns> public Quaternion LeftRotation() { return(VRTK_DeviceFinder.DeviceTransform(VRTK_DeviceFinder.Devices.LeftController).rotation); }
/// <summary> /// The position of the left controller in space. /// </summary> /// <returns>A 3-dimensional vector, equal to the left controller's displacement in the [0] x direction (float), [1] y direction (float), and [2] z direction (float).</returns> public Vector3 LeftPosition() { return(VRTK_DeviceFinder.DeviceTransform(VRTK_DeviceFinder.Devices.LeftController).position); }
/// <summary> /// The transform (position, rotation, scale) of the left controller. /// </summary> /// <returns>The transform component of the left controller.</returns> public Transform LeftTransform() { return(VRTK_DeviceFinder.DeviceTransform(VRTK_DeviceFinder.Devices.LeftController)); }
void findDevice() { Transform _transform = VRTK_DeviceFinder.DeviceTransform((VRTK.VRTK_DeviceFinder.Devices)device.Value); deviceObject.Value = _transform.gameObject; }