Skip to content

Commit

Permalink
Added option to close executable with the escape key
Browse files Browse the repository at this point in the history
  • Loading branch information
dcyoung committed Aug 14, 2017
1 parent ce6d22e commit 448662d
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 3 deletions.
12 changes: 12 additions & 0 deletions Assets/Scenes/main.unity
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ GameObject:
- component: {fileID: 401532114}
- component: {fileID: 401532113}
- component: {fileID: 401532115}
- component: {fileID: 401532116}
m_Layer: 0
m_Name: PointCloudGenerator
m_TagString: Untagged
Expand Down Expand Up @@ -168,6 +169,17 @@ MonoBehaviour:
scaleAdjustSensitivity: 0.005
userCanAdjustYaw: 0
yawAdjustSensitivity: 0.15
--- !u!114 &401532116
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 401532112}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 869509cfaaf611f4bb3e4289fcdfee6a, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &433422985
GameObject:
m_ObjectHideFlags: 0
Expand Down
12 changes: 12 additions & 0 deletions Assets/Scenes/miniature.unity
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ GameObject:
- component: {fileID: 401532114}
- component: {fileID: 401532113}
- component: {fileID: 401532115}
- component: {fileID: 401532116}
m_Layer: 0
m_Name: PointCloudGenerator
m_TagString: Untagged
Expand Down Expand Up @@ -168,6 +169,17 @@ MonoBehaviour:
scaleAdjustSensitivity: 0.005
userCanAdjustYaw: 1
yawAdjustSensitivity: 0.15
--- !u!114 &401532116
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 401532112}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 869509cfaaf611f4bb3e4289fcdfee6a, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &433422985
GameObject:
m_ObjectHideFlags: 0
Expand Down
14 changes: 14 additions & 0 deletions Assets/Scripts/CloseApplication.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CloseApplication : MonoBehaviour
{

// Update is called once per frame
void Update()
{
if (Input.GetKey(KeyCode.Escape))
Application.Quit();
}
}
12 changes: 12 additions & 0 deletions Assets/Scripts/CloseApplication.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ProjectSettings/EditorBuildSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ EditorBuildSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Scenes:
- enabled: 1
- enabled: 0
path: Assets/Scenes/main.unity
guid: 719ad96afbf06dc4da7a44ed053e3eb3
- enabled: 0
- enabled: 1
path: Assets/Scenes/miniature.unity
guid: 8ee21dd8d29fd6c4fb18fedd2c7eb1d6
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ Main Viewer | Miniature Viewer
- Wait for the application to parse the file and render the points.
- For the main viewer, use `Q` & `E` to adjust the vertical position of the point cloud so the camera appears to be at head height, and the floor in the scan matches the ground plane. Then walk around inside the scan.
- For the miniature viewer, experiment with the transform controls listed below to view the diorama.
- To exit the application, simply `alt-tab` out and close the executable.
- To exit the application and close the executable, press `ESC`.

### Controls
- `WASD`: movement
- `Mouse`: look around
- `Q` & `E`: adjust the vertical position of the point cloud
- `Z` & `C`: adjust the scale of the point cloud (only available in miniature scene)
- `R` & `T`: adjust the yaw rotation of the point cloud (only available in miniature scene)
- `ESC`: exit application

### Notes on VR
- Support for VR is included.
Expand Down

0 comments on commit 448662d

Please sign in to comment.