This commit is contained in:
2016-05-27 23:44:15 +02:00
parent 3ed5cd974a
commit e9c8196e4c
20 changed files with 47 additions and 5 deletions
Binary file not shown.
Binary file not shown.
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c1be310d4dc3f0741a75768cc27f107e
timeCreated: 1464323208
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: afd179201f2b58d4aafb3069a8889929
timeCreated: 1464323284
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
+6
View File
@@ -5,6 +5,8 @@ public class LeftController : MonoBehaviour {
public GameObject MainCamera; public GameObject MainCamera;
public GameObject WarehouseCamera; public GameObject WarehouseCamera;
public GameObject NormalRoom;
public GameObject TransparentRoom;
Transform controllerRig; Transform controllerRig;
SteamVR_ControllerEvents controllerEvents; SteamVR_ControllerEvents controllerEvents;
@@ -33,6 +35,8 @@ public class LeftController : MonoBehaviour {
WarehouseCamera.SetActive(true); WarehouseCamera.SetActive(true);
controllerRig.SetParent(WarehouseCamera.transform, false); controllerRig.SetParent(WarehouseCamera.transform, false);
inWarehouse = true; inWarehouse = true;
NormalRoom.SetActive(false);
TransparentRoom.SetActive(true);
} }
} else { } else {
cameraFade.SetFade(0.0f); cameraFade.SetFade(0.0f);
@@ -40,6 +44,8 @@ public class LeftController : MonoBehaviour {
controllerRig.SetParent(MainCamera.transform, false); controllerRig.SetParent(MainCamera.transform, false);
WarehouseCamera.SetActive(false); WarehouseCamera.SetActive(false);
inWarehouse = false; inWarehouse = false;
NormalRoom.SetActive(true);
TransparentRoom.SetActive(false);
} }
} }
Binary file not shown.
Binary file not shown.
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b301ab6d21d8ae3489afc246a19b7a12
timeCreated: 1464327233
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
+13
View File
@@ -9,6 +9,7 @@ public class RightController : MonoBehaviour {
public GameObject MainCamera; public GameObject MainCamera;
public GameObject WarehouseCamera; public GameObject WarehouseCamera;
SteamVR_TrackedObject controller;
SteamVR_LaserPointer laserPointer; SteamVR_LaserPointer laserPointer;
SteamVR_ControllerEvents controllerEvents; SteamVR_ControllerEvents controllerEvents;
BoxCollider boxCollider; BoxCollider boxCollider;
@@ -27,7 +28,11 @@ public class RightController : MonoBehaviour {
Measurement currentMeasurement = null; Measurement currentMeasurement = null;
Vector3 lastPos;
void Awake() { void Awake() {
controller = GetComponent<SteamVR_TrackedObject>();
laserPointer = GetComponent<SteamVR_LaserPointer>(); laserPointer = GetComponent<SteamVR_LaserPointer>();
controllerEvents = GetComponent<SteamVR_ControllerEvents>(); controllerEvents = GetComponent<SteamVR_ControllerEvents>();
@@ -45,6 +50,8 @@ public class RightController : MonoBehaviour {
void Start () { void Start () {
laserPointer.pointer.layer = 9; laserPointer.pointer.layer = 9;
lastPos = transform.position;
} }
void Update () { void Update () {
@@ -63,6 +70,8 @@ public class RightController : MonoBehaviour {
if (currentMeasurement != null) { if (currentMeasurement != null) {
currentMeasurement.EndPosition = transform.localPosition; currentMeasurement.EndPosition = transform.localPosition;
} }
lastPos = transform.position;
} }
void OnTriggerEnter(Collider other) { void OnTriggerEnter(Collider other) {
@@ -106,6 +115,10 @@ public class RightController : MonoBehaviour {
var furnitureMini = heldItem.GetComponent<FurnitureMiniature>(); var furnitureMini = heldItem.GetComponent<FurnitureMiniature>();
if (furnitureMini) { if (furnitureMini) {
furnitureMini.Release(); furnitureMini.Release();
/*var device = SteamVR_Controller.Input((int)controller.index);
var rb = furnitureMini.GetComponent<Rigidbody>();
rb.velocity = device.velocity;
rb.angularVelocity = device.angularVelocity;*/
} }
heldItem = null; heldItem = null;
} }
+4 -4
View File
@@ -220,7 +220,7 @@ public class SteamVR_Render : MonoBehaviour
c.transform.localRotation = vr.eyes[i].rot; c.transform.localRotation = vr.eyes[i].rot;
// Update position to keep from getting culled // Update position to keep from getting culled
cameraMask.transform.position = c.transform.position; //cameraMask.transform.position = c.transform.position;
var camera = c.GetComponent<Camera>(); var camera = c.GetComponent<Camera>();
camera.targetTexture = SteamVR_Camera.GetSceneTexture(camera.hdr); camera.targetTexture = SteamVR_Camera.GetSceneTexture(camera.hdr);
@@ -321,9 +321,9 @@ public class SteamVR_Render : MonoBehaviour
void Awake() void Awake()
{ {
#if (UNITY_5_3 || UNITY_5_2 || UNITY_5_1 || UNITY_5_0) #if (UNITY_5_3 || UNITY_5_2 || UNITY_5_1 || UNITY_5_0)
var go = new GameObject("cameraMask"); //var go = new GameObject("cameraMask");
go.transform.parent = transform; //go.transform.parent = transform;
cameraMask = go.AddComponent<SteamVR_CameraMask>(); //cameraMask = go.AddComponent<SteamVR_CameraMask>();
#endif #endif
if (externalCamera == null && System.IO.File.Exists(externalCameraConfigPath)) if (externalCamera == null && System.IO.File.Exists(externalCameraConfigPath))
{ {
BIN
View File
Binary file not shown.
-1
View File
@@ -1,7 +1,6 @@
using UnityEngine; using UnityEngine;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEditor;
[ExecuteInEditMode] [ExecuteInEditMode]
public class WarehouseRow : MonoBehaviour { public class WarehouseRow : MonoBehaviour {
Binary file not shown.