This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OVRPose tracker = OVRManager.tracker.GetPose(); | |
trackerAnchor.localRotation = tracker.orientation; | |
#if UNITY_EDITOR_OSX | |
// OS X Editorの時は、カメラの向き設定を差し替える | |
centerEyeAnchor.localRotation = OVROSX.JoyconTracker.Instance.GetLeftOrientation(); | |
leftEyeAnchor.localRotation = centerEyeAnchor.localRotation; | |
rightEyeAnchor.localRotation = centerEyeAnchor.localRotation; | |
#elif UNITY_2017_2_OR_NEWER |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static ControllerState4 GetControllerState4(uint controllerMask) | |
{ | |
#if UNITY_EDITOR | |
if (controllerMask == (uint)OVRInput.Controller.RTrackedRemote) { | |
ControllerState4 state = new ControllerState4(); | |
state.ConnectedControllers = (uint)Controller.RTrackedRemote; | |
state.RIndexTrigger = OVROSX.JoyconTracker.Instance.GetTriggerState() ? 1.0f : 0.0f; | |
return state; | |
} else { | |
ControllerState4 controllerState = new ControllerState4(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static OVRInput() | |
{ | |
controllers = new List<OVRControllerBase> | |
{ | |
#if UNITY_ANDROID && !UNITY_EDITOR | |
new OVRControllerGamepadAndroid(), | |
new OVRControllerTouchpad(), | |
new OVRControllerLTrackedRemote(), | |
new OVRControllerRTrackedRemote(), | |
#elif UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace OVROSX { | |
class MouseMoveTracker { | |
private float baseV = 0.0f; | |
private float diffV = 0.0f; | |
private float baseH = 0.0f; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace OVROSX { | |
public class HeadTracking : MonoBehaviour { | |
public static HeadTracking instance { get; private set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static BatteryStatus batteryStatus | |
{ | |
get { | |
#if UNITY_EDITOR_OSX | |
return BatteryStatus.NotCharging; | |
#else | |
return OVRP_1_1_0.ovrp_GetSystemBatteryStatus(); | |
#endif | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace OVROSX { | |
[RequireComponent(typeof(JoyconManager))] | |
public class JoyconTracker : MonoBehaviour { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Quaternion GetVector() | |
{ | |
Quaternion q = Quaternion.AngleAxis( 90.0f, Vector3.right ); | |
Vector3 v1 = q * new Vector3(j_b.x, i_b.x, k_b.x); | |
Vector3 v2 = q * -(new Vector3(j_b.z, i_b.z, k_b.z)); | |
if (v2 != Vector3.zero){ | |
return Quaternion.LookRotation(v1, v2); | |
}else{ | |
return Quaternion.identity; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************************************ | |
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved. | |
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License"); | |
you may not use the Oculus VR Rift SDK except in compliance with the License, | |
which is provided at the time of installation or download, or which | |
otherwise accompanies this software in either electronic or hard copy form. | |
You may obtain a copy of the License at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.lyokato.rtc360; | |
import android.content.Context; | |
import android.util.Log; | |
import android.view.Surface; | |
import com.serenegiant.usb.Size; | |
import com.serenegiant.usb.UVCCamera; | |
import org.webrtc.SurfaceTextureHelper; |