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.Generic; | |
using UnityEngine; | |
using UnityEngine.XR; | |
namespace absurdjoy.axe | |
{ | |
public class SetTrackingMode : MonoBehaviour | |
{ | |
public TrackingOriginModeFlags trackingFlags = TrackingOriginModeFlags.Floor; | |
public bool recenterOnSet = true; |
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
#if UNITY_EDITOR | |
using UnityEditor; | |
using UnityEditor.Animations; | |
using UnityEngine.Timeline; | |
#endif | |
using System; | |
using UnityEngine; | |
namespace absurdjoy |
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 UnityEngine; | |
namespace absurdjoy | |
{ | |
public class SmoothDampTransform : MonoBehaviour, IAssignableTransform | |
{ | |
[Tooltip("What transform should we try to follow? (Optional)")] | |
public Transform targetTransform; | |
// TODO: Hide this section in editor if not tracking. |
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 UnityEngine; | |
namespace absurdjoy | |
{ | |
public interface IAssignableTransform | |
{ | |
bool AssignTransform(Transform newTransform); | |
bool RemoveAssignedTransform(Transform toRemove); | |
} |
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 UnityEngine; | |
namespace absurdjoy | |
{ | |
/// <summary> | |
/// A "companion" camera is one that displays to a computer monitor while an accompanying XR player is in an HMD nearby. | |
/// This script can be extended for added functionality, but acts as a decent placeholder for a static camera in a scene. | |
/// </summary> | |
public class CompanionCamera : 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
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.XR; | |
namespace absurdjoy | |
{ | |
/// <summary> | |
/// Basic management script to wrangle all the CompanionCameras we might have in the scene. | |
/// </summary> | |
public class CompanionCameraManager : 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
using UnityEngine; | |
namespace absurdjoy | |
{ | |
public class TransformManipulator_DelaySync : MonoBehaviour | |
{ | |
public uint delayFrames; | |
public uint randomJitter; | |
private bool isSet = false; |
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 UnityEngine; | |
namespace absurdjoy | |
{ | |
public class TransformManipulator_Delay : TransformManipulator_Abstract | |
{ | |
public bool useSync = true; | |
[ConditionalField("useSync", false, false)] | |
[Tooltip("How many frames you want to delay the output for.")] |
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 UnityEngine; | |
namespace absurdjoy | |
{ | |
public struct TransformValues | |
{ | |
public Vector3 position; | |
public Quaternion rotation; | |
public TransformValues(Vector3 position, Quaternion rotation) |
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 UnityEngine; | |
namespace absurdjoy | |
{ | |
public abstract class TransformManipulator_Abstract : MonoBehaviour | |
{ | |
public bool useLocalSpace; | |
private Transform target; | |
public virtual void SetTarget(Transform target) |
NewerOlder