This file contains 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; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text; | |
using System.Threading.Tasks; | |
using UnityEngine; | |
#if WINDOWS_UWP | |
using Windows.Storage; | |
#endif |
This file contains 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 UnityEngine; | |
using System.Collections; | |
public class FlyCamera : MonoBehaviour | |
{ | |
/* | |
Writen by Windexglow 11-13-10. Use it, edit it, steal it I don't care. | |
Converted to C# 27-02-13 - no credit wanted. | |
Reformatted and cleaned by Ryan Breaker 23-6-18 | |
Added Q/E keys to move up/down and only move mouse when right button clicked by Julia Schwarz 29-3-20 |
This file contains 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 UnityEngine; | |
using System.Collections; | |
public class FlyCamera : MonoBehaviour { | |
/* | |
Writen by Windexglow 11-13-10. Use it, edit it, steal it I don't care. | |
Converted to C# 27-02-13 - no credit wanted. | |
Simple flycam I made, since I couldn't find any others made public. | |
Made simple to use (drag and drop, done) for regular keyboard layout |
This file contains 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
# This .gitignore file should be placed at the root of your Unity project directory | |
# | |
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore | |
# | |
/[Ll]ibrary/ | |
/[Tt]emp/ | |
/[Oo]bj/ | |
/[Bb]uild/ | |
/[Bb]uilds/ | |
/[Ll]ogs/ |
This file contains 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 UnityEngine; | |
#if WINDOWS_UWP | |
using System; | |
using System.Runtime.InteropServices; | |
using UnityEngine.XR.WSA; | |
using Windows.UI.Input; | |
using Windows.UI.Input.Spatial; | |
using Windows.Perception; | |
using Windows.Perception.Spatial; |
This file contains 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
// Approach using LINQ | |
private bool IsAnyHandPressed() | |
{ | |
return CoreServices.InputSystem.DetectedControllers | |
.OfType<IMixedRealityHand>() | |
.Any(h => h.Interactions.Any(i => i.InputType == DeviceInputType.Select && i.BoolData)); | |
} | |
// Approach using for loops | |
private bool IsAnyHandPressed() |
This file contains 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
private bool IsAnyHandPressed() | |
{ | |
foreach (var controller in CoreServices.InputSystem.DetectedControllers) | |
{ | |
if (controller is IMixedRealityHand) | |
{ | |
for (int i = 0; i < controller.Interactions.Length; i++) | |
{ | |
if(controller.Interactions[i].InputType == DeviceInputType.Select) | |
{ |
This file contains 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 (c) Microsoft Corporation. All rights reserved. | |
// Licensed under the MIT License. See LICENSE in the project root for license information. | |
using Microsoft.MixedReality.Toolkit.Input; | |
using Microsoft.MixedReality.Toolkit.Physics; | |
using Microsoft.MixedReality.Toolkit.Utilities; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEngine; |
This file contains 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 (c) Microsoft Corporation. All rights reserved. | |
// Licensed under the MIT License. See LICENSE in the project root for license information. | |
using Microsoft.MixedReality.Toolkit.Input; | |
using Microsoft.MixedReality.Toolkit.Utilities; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Events; | |
using UnityEngine.EventSystems; |
This file contains 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 (c) Microsoft Corporation. All rights reserved. | |
// Licensed under the MIT License. See LICENSE in the project root for license information. | |
using Microsoft.MixedReality.Toolkit.Input; | |
using Microsoft.MixedReality.Toolkit.Physics; | |
using Microsoft.MixedReality.Toolkit.Utilities; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEngine; |
NewerOlder