AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
BaseRayStabilizer.cs
Go to the documentation of this file.
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // Licensed under the MIT License. See LICENSE in the project root for license information.
3 
4 using UnityEngine;
5 
6 namespace HoloToolkit.Unity.InputModule
7 {
12  public abstract class BaseRayStabilizer : MonoBehaviour
13  {
17  public abstract Vector3 StablePosition { get; }
18 
22  public abstract Quaternion StableRotation { get; }
23 
27  public abstract Ray StableRay { get; }
28 
34  public virtual void UpdateStability(Vector3 position, Quaternion rotation)
35  {
36  UpdateStability(position, (rotation * Vector3.forward));
37  }
38 
44  public abstract void UpdateStability(Vector3 position, Vector3 direction);
45  }
46 }
A base class for a stabilizer that takes an input position and rotation, and performs operations on t...
virtual void UpdateStability(Vector3 position, Quaternion rotation)
Call this each frame to smooth out changes to a position and rotation, if supported.