├── ProjectSettings ├── ProjectVersion.txt ├── ClusterInputManager.asset ├── NetworkManager.asset ├── XRSettings.asset ├── TimeManager.asset ├── EditorBuildSettings.asset ├── VFXManager.asset ├── AudioManager.asset ├── EditorSettings.asset ├── TagManager.asset ├── PresetManager.asset ├── UnityConnectSettings.asset ├── DynamicsManager.asset ├── Physics2DSettings.asset ├── NavMeshAreas.asset ├── GraphicsSettings.asset ├── QualitySettings.asset ├── InputManager.asset ├── ProBuilderSettings.json └── ProjectSettings.asset ├── Assets ├── _Prefabs │ ├── Grabable.prefab.meta │ ├── XR Rig.prefab.meta │ ├── Climbable.prefab.meta │ ├── Climbable.prefab │ ├── Grabable.prefab │ └── XR Rig.prefab ├── _Scenes.meta ├── _Materials.meta ├── _Prefabs.meta ├── _Scenes │ └── ClimbingAndPickup.unity.meta ├── _Scripts.meta ├── _Materials │ ├── Blue.mat.meta │ ├── Green.mat.meta │ ├── Grey.mat.meta │ ├── Red.mat.meta │ ├── BlueTransparent.mat.meta │ ├── GreenTransparent.mat.meta │ ├── GreyTransparent.mat.meta │ ├── RedTransparent.mat.meta │ ├── Red.mat │ ├── Blue.mat │ ├── Green.mat │ ├── Grey.mat │ ├── RedTransparent.mat │ ├── BlueTransparent.mat │ ├── GreenTransparent.mat │ └── GreyTransparent.mat └── _Scripts │ ├── PlayerWalk.cs.meta │ ├── RingBuffer.cs.meta │ ├── CollisionDebug.cs.meta │ ├── Interactable.cs.meta │ ├── PhysicsManager.cs.meta │ ├── PlayerClimb.cs.meta │ ├── PlayerInput.cs.meta │ ├── BodyLeanPoseProvider.cs.meta │ ├── PlayerReferences.cs.meta │ ├── XRRigFloorOffset.cs.meta │ ├── BodyColliderBehaviour.cs.meta │ ├── DeviceHandPosRotAdjust.cs.meta │ ├── PlayerInput_Interactor.cs.meta │ ├── VelocitiesFromTransform.cs.meta │ ├── ConfigurableJointExtensions.cs.meta │ ├── DeviceInteractorPosRotOffset.cs.meta │ ├── ProjectileRotationFromVelocity.cs.meta │ ├── SetPhysicsStepByHeadsetRefreshRate.cs.meta │ ├── PhysicsManager.cs │ ├── CollisionDebug.cs │ ├── ProjectileRotationFromVelocity.cs │ ├── PlayerReferences.cs │ ├── XRRigFloorOffset.cs │ ├── RingBuffer.cs │ ├── SetPhysicsStepByHeadsetRefreshRate.cs │ ├── DeviceHandPosRotAdjust.cs │ ├── DeviceInteractorPosRotOffset.cs │ ├── BodyColliderBehaviour.cs │ ├── Interactable.cs │ ├── VelocitiesFromTransform.cs │ ├── BodyLeanPoseProvider.cs │ ├── ConfigurableJointExtensions.cs │ ├── PlayerClimb.cs │ ├── PlayerWalk.cs │ ├── PlayerInput.cs │ └── PlayerInput_Interactor.cs ├── .gitignore ├── README.md ├── LICENSE └── Packages └── manifest.json /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2019.2.0f1 2 | m_EditorVersionWithRevision: 2019.2.0f1 (20c1667945cf) 3 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /Assets/_Prefabs/Grabable.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f06bb9af2bb289468d75e6f70331dd9 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/_Prefabs/XR Rig.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 71c0b0fce364fa94ab0f92b2e776226f 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/_Prefabs/Climbable.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d95efd6e0f6d8b34f881f2e3f4e1ccf4 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/_Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c90794ae35d06db45a2a0dc8fbc5815c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /Assets/_Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e789fb1083d0e743b827c6b95d2aeaf 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a6e87aa82c45a1b4cae7e82ca92c32e4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Scenes/ClimbingAndPickup.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9010073c89564354d9cc29c7d27453eb 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/_Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d5ff4f06499fc374981f106a73d3e25e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /Assets/_Materials/Blue.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d36bcb34057cb6a48af9c25fb99455ab 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Materials/Green.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d2221ceebae39442af86f069216f71f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Materials/Grey.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5efe814a69071ce4ca2f23faac38ccea 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Materials/Red.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aff09751070886f479ee192a126a0493 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Materials/BlueTransparent.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea615d591de3f6541925f33520093514 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Materials/GreenTransparent.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d4fe47b89599ce143ab81cdc826a2110 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Materials/GreyTransparent.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e6f61d60a36ffab40b5536b6a23a2c45 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Materials/RedTransparent.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f7a878fc40ae2c42b5aff894759f62f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.1 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /Assets/_Scripts/PlayerWalk.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 995d7d9dfe496fc498491694fb8b5dde 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/RingBuffer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 587934e2725a0624a803cfcd3613083c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/CollisionDebug.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d030a6671fbd164ea82daab9fdbd381 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/Interactable.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: edc9974ea4c7445408dcf3961f157415 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/PhysicsManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 10d6472ec4d0769449e4e7e5a7732c91 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/PlayerClimb.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7fcb377442d2174c9006d8c48f27b5e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/PlayerInput.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 45c745c5054094f4599abc3859047823 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/BodyLeanPoseProvider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fbff8d9278898264aab5446721163821 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/PlayerReferences.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 97b2fc63250f3aa4a9dc1f94061733fa 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: -95 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/XRRigFloorOffset.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9ef885f046ae574691806f5b2ca0352 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/BodyColliderBehaviour.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41627f87b43b0f444bd48010c2b362b4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/DeviceHandPosRotAdjust.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3e9794b8fd0a1484f88a16c4324e76e8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/PlayerInput_Interactor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2fb7cfb7e2bda5547ac80aab72fe4c96 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/VelocitiesFromTransform.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 153bf3ff3d6a67f4ea339fb734df0e9a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/ConfigurableJointExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7216b9825daed7d459e032d96b0eaf0e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/DeviceInteractorPosRotOffset.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 402375ff00bc2e5439910e53b7715de3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/ProjectileRotationFromVelocity.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 362c332a02775d24fbe733b1c3dadc1b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_Scripts/SetPhysicsStepByHeadsetRefreshRate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da0381657c80877418a54d2e0dd41b16 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/_Scenes/ClimbingAndPickup.unity 10 | guid: 9010073c89564354d9cc29c7d27453eb 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_RenderPipeSettingsPath: 10 | m_FixedTimeStep: 0.016666668 11 | m_MaxDeltaTime: 0.05 12 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 1024 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /Assets/_Scripts/PhysicsManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class PhysicsManager : MonoBehaviour 6 | { 7 | // Start is called before the first frame update 8 | void Start() 9 | { 10 | Physics.autoSimulation = false; 11 | } 12 | 13 | // Update is called once per frame 14 | void LateUpdate() 15 | { 16 | Physics.Simulate(Time.deltaTime); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | [Bb]uild/ 5 | [Bb]uilds/ 6 | Assets/AssetStoreTools* 7 | 8 | # Visual Studio cache directory 9 | .vs/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | *.opendb 26 | 27 | # Unity3D generated meta files 28 | *.pidb.meta 29 | *.pdb.meta 30 | 31 | # Unity3D Generated File On Crash Reports 32 | sysinfo.txt 33 | 34 | # Builds 35 | *.apk 36 | *.unitypackage 37 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_SpritePackerMode: 0 12 | m_SpritePackerPaddingPower: 1 13 | m_EtcTextureCompressorBehavior: 1 14 | m_EtcTextureFastCompressor: 1 15 | m_EtcTextureNormalCompressor: 2 16 | m_EtcTextureBestCompressor: 4 17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 18 | m_ProjectGenerationRootNamespace: 19 | m_UserGeneratedProjectSuffix: 20 | m_CollabEditorSettings: 21 | inProgressEnabled: 1 22 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: 7 | - InvisibilityGestureZone 8 | - MageArmorGestureZoneLeft 9 | - MageArmorGestureZoneRight 10 | layers: 11 | - Default 12 | - TransparentFX 13 | - Ignore Raycast 14 | - 15 | - Water 16 | - UI 17 | - 18 | - 19 | - PostProcessing 20 | - Player 21 | - Interactor 22 | - DontHitPlayer 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | - 41 | - 42 | - 43 | m_SortingLayers: 44 | - name: Default 45 | uniqueID: 0 46 | locked: 0 47 | -------------------------------------------------------------------------------- /Assets/_Scripts/CollisionDebug.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class CollisionDebug : MonoBehaviour 6 | { 7 | private void OnCollisionEnter(Collision collision) 8 | { 9 | Debug.Log("OnCollisionEnter " + collision.rigidbody.name); 10 | } 11 | 12 | private void OnCollisionExit(Collision collision) 13 | { 14 | Debug.Log("OnCollisionExit " + collision.rigidbody.name); 15 | } 16 | 17 | private void OnTriggerEnter(Collider other) 18 | { 19 | Debug.Log("OnTriggerEnter " + other.name); 20 | } 21 | 22 | private void OnTriggerExit(Collider other) 23 | { 24 | Debug.Log("OnTriggerExit " + other.name); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UnityXRGrabAndClimb 2 | This Unity project is a very simple XR interactions tech example that implements grabbing and climbing using Unity's multiplatform APIs. It's not super clean, but it does showcase a fully physics-based XR Rig. 3 | 4 | Unity version 2019.2.0f1 5 | 6 | This project targets "roomscale" VR. As such, it meant to be experienced on a HTC Vive, Oculus Rift, or Windows Mixed Reality Immersive headset. It should also work on any other roomscale headset that is supported by one of those SDKs in the future. 7 | 8 | You can read a bit more about Unity's multiplatform features here: https://blogs.unity3d.com/2018/11/22/multi-platform-vr-features-in-2018-3/ 9 | 10 | You can read a bit more about complicated Rigidbody/Collider setups in Unity here: http://jackpritz.com/blog/unity-colliderrigidbody-setups-in-xr 11 | -------------------------------------------------------------------------------- /Assets/_Scripts/ProjectileRotationFromVelocity.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | [RequireComponent(typeof(Rigidbody))] 6 | public class ProjectileRotationFromVelocity : MonoBehaviour 7 | { 8 | private Rigidbody MyRigidbody; 9 | [Tooltip("If you want the forward direction of the flight of an object to be different than the default forward of the gameobject, specify an Euler rotation correction here.")] 10 | public Vector3 ObjectForwardDirectionCorrection = new Vector3(0, 0, 0); 11 | 12 | private void Start() 13 | { 14 | MyRigidbody = GetComponent(); 15 | } 16 | 17 | private void Update() 18 | { 19 | if (MyRigidbody.velocity.magnitude > 1f) 20 | MyRigidbody.MoveRotation(Quaternion.LookRotation(MyRigidbody.velocity) * Quaternion.Euler(ObjectForwardDirectionCorrection)); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | m_DefaultList: 7 | - type: 8 | m_NativeTypeID: 108 9 | m_ManagedTypePPtr: {fileID: 0} 10 | m_ManagedTypeFallback: 11 | defaultPresets: 12 | - m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea, 13 | type: 2} 14 | - type: 15 | m_NativeTypeID: 1020 16 | m_ManagedTypePPtr: {fileID: 0} 17 | m_ManagedTypeFallback: 18 | defaultPresets: 19 | - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6, 20 | type: 2} 21 | - type: 22 | m_NativeTypeID: 1006 23 | m_ManagedTypePPtr: {fileID: 0} 24 | m_ManagedTypeFallback: 25 | defaultPresets: 26 | - m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9, 27 | type: 2} 28 | -------------------------------------------------------------------------------- /Assets/_Scripts/PlayerReferences.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | [RequireComponent(typeof(PlayerInput))] 6 | [RequireComponent(typeof(PlayerClimb))] 7 | [RequireComponent(typeof(PlayerWalk))] 8 | public class PlayerReferences : MonoBehaviour 9 | { 10 | public GameObject head; 11 | public GameObject leftHand; 12 | public GameObject rightHand; 13 | 14 | public Rigidbody rigRigidbody { get; private set; } 15 | public PlayerInput playerInput { get; private set; } 16 | public PlayerClimb playerClimb { get; private set; } 17 | public PlayerWalk playerWalk { get; private set; } 18 | 19 | private void Awake() 20 | { 21 | rigRigidbody = GetComponent(); 22 | playerInput = GetComponent(); 23 | playerClimb = GetComponent(); 24 | playerWalk = GetComponent(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 1 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 1 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /Assets/_Scripts/XRRigFloorOffset.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | using UnityEngine.XR; 6 | 7 | public class XRRigFloorOffset : MonoBehaviour 8 | { 9 | public float OffsetHeight = 1.69f; 10 | 11 | // Start is called before the first frame update 12 | void Start() 13 | { 14 | TrySetRoomScale(); 15 | } 16 | 17 | public void TrySetRoomScale() 18 | { 19 | if (XRDevice.SetTrackingSpaceType(TrackingSpaceType.RoomScale)) 20 | { 21 | transform.localPosition = Vector3.zero; 22 | Debug.Log("SUCCESS: XRRigFloorOffset.TrySetRoomScale() on Application.platform= " + Application.platform + " and XRSettings.loadedDeviceName=" + XRSettings.loadedDeviceName); 23 | } 24 | else 25 | { 26 | transform.localPosition = new Vector3(0, OffsetHeight, 0); 27 | Debug.Log("FAILURE: XRRigFloorOffset.TrySetRoomScale() on Application.platform= " + Application.platform + " and XRSettings.loadedDeviceName=" + XRSettings.loadedDeviceName); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 immemorable-moniker 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Assets/_Scripts/RingBuffer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class RingBuffer 6 | { 7 | T[] backingValues; 8 | 9 | public int Count { get; private set; } 10 | 11 | private int frontIndex = 0; 12 | 13 | public RingBuffer(int bufferSize) 14 | { 15 | backingValues = new T[bufferSize]; 16 | Count = 0; 17 | } 18 | 19 | public void Add(T item) 20 | { 21 | if (Count != backingValues.Length) 22 | Count++; 23 | 24 | backingValues[frontIndex] = item; 25 | frontIndex++; 26 | frontIndex = frontIndex % backingValues.Length; 27 | } 28 | 29 | public void Clear() 30 | { 31 | frontIndex = 0; 32 | Count = 0; 33 | } 34 | 35 | // returns values with zero being the most recent value 36 | public T this[int index] 37 | { 38 | get 39 | { 40 | if (index < 0 || index >= Count) 41 | return default; 42 | 43 | index = frontIndex - index; 44 | 45 | if (index < 0) 46 | index = backingValues.Length + index; 47 | 48 | return backingValues[index]; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 10 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1fffffffdfffffffdfffffffdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | -------------------------------------------------------------------------------- /Assets/_Scripts/SetPhysicsStepByHeadsetRefreshRate.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | using UnityEngine.XR; 6 | 7 | public class SetPhysicsStepByHeadsetRefreshRate : MonoBehaviour 8 | { 9 | void OnEnable() 10 | { 11 | XRDevice.deviceLoaded += OnDeviceLoaded; 12 | } 13 | 14 | void OnDisable() 15 | { 16 | XRDevice.deviceLoaded += OnDeviceLoaded; 17 | } 18 | 19 | void OnDeviceLoaded(string device) 20 | { 21 | Debug.Log("Loaded device " + device + ". Refresh rate detected as " + XRDevice.refreshRate); 22 | 23 | // set physics refresh rate to HMD framerate 24 | Time.fixedDeltaTime = 1 / XRDevice.refreshRate; 25 | 26 | //float fraction = 2.0f; 27 | //Time.fixedDeltaTime = fraction / XRDevice.refreshRate; 28 | 29 | //// set to a fraction of the refresh rate, but < 50 Hz == > 0.02f 30 | //while (Time.fixedDeltaTime < 0.02f) 31 | //{ 32 | // Debug.Log("fixedDeltaTime " + Time.fixedDeltaTime + " is too low. Adjusting."); 33 | // fraction += 1.0f; 34 | // Time.fixedDeltaTime = fraction / XRDevice.refreshRate; 35 | //} 36 | 37 | Debug.Log("fixedDeltaTime has been set to " + Time.fixedDeltaTime); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Assets/_Scripts/DeviceHandPosRotAdjust.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | using UnityEngine.XR; 6 | 7 | public class DeviceHandPosRotAdjust : MonoBehaviour 8 | { 9 | // Start is called before the first frame update 10 | void Awake() 11 | { 12 | Debug.Log("In DeviceHandPosRotAdjust, XRSettings.loadedDeviceName is " + XRSettings.loadedDeviceName + " and " 13 | + "model is " + XRDevice.model); 14 | 15 | if (XRSettings.loadedDeviceName.Contains("OpenVR") && XRDevice.model.Contains("Vive")) 16 | { 17 | transform.localPosition += new Vector3(0, 0, -0.1f); 18 | transform.rotation = Quaternion.Euler(60, 0, 0); 19 | } 20 | else if (XRSettings.loadedDeviceName.Contains("OpenVR") && XRDevice.model.Contains("Rift")) 21 | { 22 | transform.localPosition += new Vector3(0, 0, -0.1f); 23 | transform.rotation = Quaternion.Euler(35, 0, 0); 24 | } 25 | else if (XRSettings.loadedDeviceName.Contains("Oculus") && XRDevice.model.Contains("Rift")) 26 | { 27 | //transform.rotation = Quaternion.Euler(45, 0, 0); 28 | transform.localPosition += new Vector3(0, 0, -0.05f); 29 | } 30 | 31 | Debug.Log("RotateByDevice rotation set to " + transform.rotation); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Assets/_Scripts/DeviceInteractorPosRotOffset.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | using UnityEngine.XR; 6 | 7 | public class DeviceInteractorPosRotOffset : MonoBehaviour 8 | { 9 | // Start is called before the first frame update 10 | void Awake() 11 | { 12 | Debug.Log("In DeviceInteractorPosRotOffset, XRSettings.loadedDeviceName is " + XRSettings.loadedDeviceName + " and " 13 | + "model is " + XRDevice.model); 14 | 15 | if (XRSettings.loadedDeviceName.Contains("OpenVR") && XRDevice.model.Contains("Vive")) 16 | { 17 | transform.localPosition += new Vector3(0, 0, -0.1f); 18 | transform.rotation = Quaternion.Euler(85, 0, 0); 19 | } 20 | else if (XRSettings.loadedDeviceName.Contains("OpenVR") && XRDevice.model.Contains("Rift")) 21 | { 22 | transform.localPosition += new Vector3(0, 0, -0.1f); 23 | transform.rotation = Quaternion.Euler(80, 0, 0); 24 | } 25 | else if (XRSettings.loadedDeviceName.Contains("Oculus") && XRDevice.model.Contains("Rift")) 26 | { 27 | transform.localPosition += new Vector3(0, 0, -0.05f); 28 | transform.rotation = Quaternion.Euler(45, 0, 0); 29 | } 30 | 31 | Debug.Log("RotateByDevice rotation set to " + transform.rotation); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Assets/_Scripts/BodyColliderBehaviour.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | [RequireComponent(typeof(CapsuleCollider))] 6 | public class BodyColliderBehaviour : MonoBehaviour 7 | { 8 | public Transform Transform { get; private set; } 9 | public Transform FloorOffset; 10 | private CapsuleCollider[] Capsules; 11 | 12 | public delegate void CollisionStatusHandler(Transform transform, bool colliding); 13 | public event CollisionStatusHandler CollisionStatusChanged; 14 | 15 | private void Awake() 16 | { 17 | Transform = transform; 18 | Capsules = GetComponents(); 19 | } 20 | 21 | // Update is called once per frame 22 | void Update() 23 | { 24 | for (int i = 0; i < Capsules.Length; i++) 25 | { 26 | Capsules[i].height = FloorOffset.localPosition.y + Transform.localPosition.y + Capsules[i].radius; // Adding capsule radius to the height allows the body collider to also function as a head collider 27 | Capsules[i].center = new Vector3(0, -((Capsules[i].height) / 2) + Capsules[i].radius, 0); 28 | } 29 | } 30 | 31 | private void OnTriggerEnter(Collider other) 32 | { 33 | CollisionStatusChanged?.Invoke(Transform, true); 34 | } 35 | 36 | private void OnTriggerStay(Collider other) 37 | { 38 | CollisionStatusChanged?.Invoke(Transform, true); 39 | } 40 | 41 | private void OnTriggerExit(Collider other) 42 | { 43 | CollisionStatusChanged?.Invoke(Transform, false); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_ReuseCollisionCallbacks: 1 28 | m_AutoSyncTransforms: 0 29 | m_AlwaysShowColliders: 0 30 | m_ShowColliderSleep: 1 31 | m_ShowColliderContacts: 0 32 | m_ShowColliderAABB: 0 33 | m_ContactArrowScale: 0.2 34 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 35 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 36 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 37 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 38 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 39 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /Assets/_Scripts/Interactable.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | [RequireComponent(typeof(Rigidbody))] 6 | public class Interactable : MonoBehaviour 7 | { 8 | public enum InteractableType 9 | { 10 | Grabable, 11 | Climbable, 12 | JointManipulator, 13 | JustEvents //Use this when you just care about using the OnGrab and OnDrop events in a separate script 14 | } 15 | 16 | public InteractableType type = InteractableType.Grabable; 17 | public bool StickyGrab = false; 18 | public bool RelativeAnchor = true; 19 | 20 | public delegate void GrabEventHandler(Interactable interactable, PlayerInput_Interactor interactor); 21 | public event GrabEventHandler OnGrab; 22 | public event GrabEventHandler OnDrop; 23 | 24 | private PlayerInput_Interactor GrabInteractor = null; 25 | private Joint grabJoint; 26 | 27 | private int InitialLayer; 28 | 29 | private void Start() 30 | { 31 | InitialLayer = gameObject.layer; 32 | } 33 | 34 | public void Grab(PlayerInput_Interactor grabScript) 35 | { 36 | ChangeLayerOfAllColliders(LayerMask.NameToLayer("DontHitPlayer")); 37 | if (GrabInteractor != null) { 38 | GrabInteractor.ForceDrop(); 39 | } 40 | 41 | GrabInteractor = grabScript; 42 | 43 | OnGrab?.Invoke(this, grabScript); 44 | } 45 | 46 | public void Drop() 47 | { 48 | if (GrabInteractor != null) 49 | { 50 | OnDrop?.Invoke(this, GrabInteractor); 51 | 52 | var tempTransform = GrabInteractor; 53 | 54 | // Do this to prevent an endless loop of dropping 55 | GrabInteractor = null; 56 | tempTransform.GetComponent().ForceDrop(); 57 | } 58 | ChangeLayerOfAllColliders(InitialLayer); 59 | } 60 | 61 | void ChangeLayerOfAllColliders(int layer) 62 | { 63 | Collider[] colliders = GetComponentsInChildren(); 64 | 65 | for (int i = 0; i < colliders.Length; i++) 66 | colliders[i].gameObject.layer = layer; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.2d.sprite": "1.0.0", 4 | "com.unity.2d.tilemap": "1.0.0", 5 | "com.unity.ads": "2.3.1", 6 | "com.unity.analytics": "3.3.2", 7 | "com.unity.collab-proxy": "1.2.16", 8 | "com.unity.ext.nunit": "1.0.0", 9 | "com.unity.ide.rider": "1.0.8", 10 | "com.unity.ide.vscode": "1.0.7", 11 | "com.unity.multiplayer-hlapi": "1.0.2", 12 | "com.unity.package-manager-ui": "2.2.0", 13 | "com.unity.probuilder": "4.0.5", 14 | "com.unity.purchasing": "2.0.6", 15 | "com.unity.test-framework": "1.0.13", 16 | "com.unity.textmeshpro": "2.0.1", 17 | "com.unity.timeline": "1.1.0", 18 | "com.unity.ugui": "1.0.0", 19 | "com.unity.xr.legacyinputhelpers": "2.0.2", 20 | "com.unity.xr.openvr.standalone": "1.0.5", 21 | "com.unity.modules.ai": "1.0.0", 22 | "com.unity.modules.androidjni": "1.0.0", 23 | "com.unity.modules.animation": "1.0.0", 24 | "com.unity.modules.assetbundle": "1.0.0", 25 | "com.unity.modules.audio": "1.0.0", 26 | "com.unity.modules.cloth": "1.0.0", 27 | "com.unity.modules.director": "1.0.0", 28 | "com.unity.modules.imageconversion": "1.0.0", 29 | "com.unity.modules.imgui": "1.0.0", 30 | "com.unity.modules.jsonserialize": "1.0.0", 31 | "com.unity.modules.particlesystem": "1.0.0", 32 | "com.unity.modules.physics": "1.0.0", 33 | "com.unity.modules.physics2d": "1.0.0", 34 | "com.unity.modules.screencapture": "1.0.0", 35 | "com.unity.modules.terrain": "1.0.0", 36 | "com.unity.modules.terrainphysics": "1.0.0", 37 | "com.unity.modules.tilemap": "1.0.0", 38 | "com.unity.modules.ui": "1.0.0", 39 | "com.unity.modules.uielements": "1.0.0", 40 | "com.unity.modules.umbra": "1.0.0", 41 | "com.unity.modules.unityanalytics": "1.0.0", 42 | "com.unity.modules.unitywebrequest": "1.0.0", 43 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 44 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 45 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 46 | "com.unity.modules.unitywebrequestwww": "1.0.0", 47 | "com.unity.modules.vehicles": "1.0.0", 48 | "com.unity.modules.video": "1.0.0", 49 | "com.unity.modules.vr": "1.0.0", 50 | "com.unity.modules.wind": "1.0.0", 51 | "com.unity.modules.xr": "1.0.0" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Assets/_Materials/Red.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Red 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 1, g: 0, b: 0, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Assets/_Materials/Blue.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Blue 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0, g: 0, b: 1, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Assets/_Materials/Green.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Green 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0, g: 1, b: 0, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Assets/_Materials/Grey.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Grey 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0.5019608, g: 0.5019608, b: 0.5019608, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Assets/_Materials/RedTransparent.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: RedTransparent 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _ALPHAPREMULTIPLY_ON 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: 3000 17 | stringTagMap: 18 | RenderType: Transparent 19 | disabledShaderPasses: [] 20 | m_SavedProperties: 21 | serializedVersion: 3 22 | m_TexEnvs: 23 | - _BumpMap: 24 | m_Texture: {fileID: 0} 25 | m_Scale: {x: 1, y: 1} 26 | m_Offset: {x: 0, y: 0} 27 | - _DetailAlbedoMap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _DetailMask: 32 | m_Texture: {fileID: 0} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _DetailNormalMap: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _EmissionMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _MainTex: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _MetallicGlossMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _OcclusionMap: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _ParallaxMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | m_Floats: 60 | - _BumpScale: 1 61 | - _Cutoff: 0.5 62 | - _DetailNormalMapScale: 1 63 | - _DstBlend: 10 64 | - _GlossMapScale: 1 65 | - _Glossiness: 0.5 66 | - _GlossyReflections: 1 67 | - _Metallic: 0 68 | - _Mode: 3 69 | - _OcclusionStrength: 1 70 | - _Parallax: 0.02 71 | - _SmoothnessTextureChannel: 0 72 | - _SpecularHighlights: 1 73 | - _SrcBlend: 1 74 | - _UVSec: 0 75 | - _ZWrite: 0 76 | m_Colors: 77 | - _Color: {r: 1, g: 0, b: 0, a: 0.39215687} 78 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 79 | -------------------------------------------------------------------------------- /Assets/_Materials/BlueTransparent.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: BlueTransparent 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _ALPHAPREMULTIPLY_ON 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: 3000 17 | stringTagMap: 18 | RenderType: Transparent 19 | disabledShaderPasses: [] 20 | m_SavedProperties: 21 | serializedVersion: 3 22 | m_TexEnvs: 23 | - _BumpMap: 24 | m_Texture: {fileID: 0} 25 | m_Scale: {x: 1, y: 1} 26 | m_Offset: {x: 0, y: 0} 27 | - _DetailAlbedoMap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _DetailMask: 32 | m_Texture: {fileID: 0} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _DetailNormalMap: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _EmissionMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _MainTex: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _MetallicGlossMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _OcclusionMap: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _ParallaxMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | m_Floats: 60 | - _BumpScale: 1 61 | - _Cutoff: 0.5 62 | - _DetailNormalMapScale: 1 63 | - _DstBlend: 10 64 | - _GlossMapScale: 1 65 | - _Glossiness: 0.5 66 | - _GlossyReflections: 1 67 | - _Metallic: 0 68 | - _Mode: 3 69 | - _OcclusionStrength: 1 70 | - _Parallax: 0.02 71 | - _SmoothnessTextureChannel: 0 72 | - _SpecularHighlights: 1 73 | - _SrcBlend: 1 74 | - _UVSec: 0 75 | - _ZWrite: 0 76 | m_Colors: 77 | - _Color: {r: 0, g: 0, b: 1, a: 0.39215687} 78 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 79 | -------------------------------------------------------------------------------- /Assets/_Materials/GreenTransparent.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: GreenTransparent 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _ALPHAPREMULTIPLY_ON 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: 3000 17 | stringTagMap: 18 | RenderType: Transparent 19 | disabledShaderPasses: [] 20 | m_SavedProperties: 21 | serializedVersion: 3 22 | m_TexEnvs: 23 | - _BumpMap: 24 | m_Texture: {fileID: 0} 25 | m_Scale: {x: 1, y: 1} 26 | m_Offset: {x: 0, y: 0} 27 | - _DetailAlbedoMap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _DetailMask: 32 | m_Texture: {fileID: 0} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _DetailNormalMap: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _EmissionMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _MainTex: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _MetallicGlossMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _OcclusionMap: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _ParallaxMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | m_Floats: 60 | - _BumpScale: 1 61 | - _Cutoff: 0.5 62 | - _DetailNormalMapScale: 1 63 | - _DstBlend: 10 64 | - _GlossMapScale: 1 65 | - _Glossiness: 0.5 66 | - _GlossyReflections: 1 67 | - _Metallic: 0 68 | - _Mode: 3 69 | - _OcclusionStrength: 1 70 | - _Parallax: 0.02 71 | - _SmoothnessTextureChannel: 0 72 | - _SpecularHighlights: 1 73 | - _SrcBlend: 1 74 | - _UVSec: 0 75 | - _ZWrite: 0 76 | m_Colors: 77 | - _Color: {r: 0, g: 1, b: 0, a: 0.39215687} 78 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 79 | -------------------------------------------------------------------------------- /Assets/_Materials/GreyTransparent.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: GreyTransparent 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _ALPHAPREMULTIPLY_ON 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: 3000 17 | stringTagMap: 18 | RenderType: Transparent 19 | disabledShaderPasses: [] 20 | m_SavedProperties: 21 | serializedVersion: 3 22 | m_TexEnvs: 23 | - _BumpMap: 24 | m_Texture: {fileID: 0} 25 | m_Scale: {x: 1, y: 1} 26 | m_Offset: {x: 0, y: 0} 27 | - _DetailAlbedoMap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _DetailMask: 32 | m_Texture: {fileID: 0} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _DetailNormalMap: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _EmissionMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _MainTex: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _MetallicGlossMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _OcclusionMap: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _ParallaxMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | m_Floats: 60 | - _BumpScale: 1 61 | - _Cutoff: 0.5 62 | - _DetailNormalMapScale: 1 63 | - _DstBlend: 10 64 | - _GlossMapScale: 1 65 | - _Glossiness: 0.5 66 | - _GlossyReflections: 1 67 | - _Metallic: 0 68 | - _Mode: 3 69 | - _OcclusionStrength: 1 70 | - _Parallax: 0.02 71 | - _SmoothnessTextureChannel: 0 72 | - _SpecularHighlights: 1 73 | - _SrcBlend: 1 74 | - _UVSec: 0 75 | - _ZWrite: 0 76 | m_Colors: 77 | - _Color: {r: 0.5019608, g: 0.5019608, b: 0.5019608, a: 0.39215687} 78 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 79 | -------------------------------------------------------------------------------- /Assets/_Scripts/VelocitiesFromTransform.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | using UnityEngine.XR; 6 | 7 | public class VelocitiesFromTransform : MonoBehaviour 8 | { 9 | public Vector3 Velocity { get; private set; } 10 | public Vector3 AngularVelocity { get; private set; } 11 | 12 | private float HistoryTimePeriod = 0.125f; 13 | private Transform MyTransform; 14 | private Vector3 PrevPosition; 15 | private Quaternion PrevRotation; 16 | public RingBuffer PrevTimeDelta { get; private set; } 17 | public RingBuffer PrevVelocity { get; private set; } 18 | public RingBuffer PrevAngularVelocity { get; private set; } 19 | 20 | private void Awake() 21 | { 22 | MyTransform = transform; 23 | 24 | int HistoryCount = (int)Mathf.Ceil(XRDevice.refreshRate * HistoryTimePeriod); 25 | 26 | PrevTimeDelta = new RingBuffer(HistoryCount); 27 | PrevVelocity = new RingBuffer(HistoryCount); 28 | PrevAngularVelocity = new RingBuffer(HistoryCount); 29 | } 30 | 31 | private void Update() 32 | { 33 | Vector3 FrameInteractorVelocity = (MyTransform.position - PrevPosition) / Time.deltaTime; 34 | Quaternion VelocityDiff = (MyTransform.rotation * Quaternion.Inverse(PrevRotation)); 35 | Vector3 FrameInteractorAngularVelocity = (new Vector3(Mathf.DeltaAngle(0, VelocityDiff.eulerAngles.x), Mathf.DeltaAngle(0, VelocityDiff.eulerAngles.y), Mathf.DeltaAngle(0, VelocityDiff.eulerAngles.z)) 36 | / Time.deltaTime) * (2 * Mathf.PI / 360f); 37 | 38 | PrevPosition = MyTransform.position; 39 | PrevRotation = MyTransform.rotation; 40 | PrevTimeDelta.Add(Time.deltaTime); 41 | PrevVelocity.Add(FrameInteractorVelocity); 42 | PrevAngularVelocity.Add(FrameInteractorAngularVelocity); 43 | 44 | Velocity = Vector3.zero; 45 | AngularVelocity = Vector3.zero; 46 | float TotalTimeDelta = 0f; 47 | int NumSamples = 0; 48 | for (int i = 0; (i < PrevVelocity.Count) && (TotalTimeDelta < HistoryTimePeriod); i++) 49 | { 50 | TotalTimeDelta += PrevTimeDelta[i]; 51 | Velocity += PrevVelocity[i]; 52 | AngularVelocity += PrevAngularVelocity[i]; 53 | NumSamples++; 54 | } 55 | 56 | Velocity /= NumSamples; 57 | AngularVelocity /= NumSamples; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} 39 | m_PreloadedShaders: [] 40 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 41 | type: 0} 42 | m_CustomRenderPipeline: {fileID: 0} 43 | m_TransparencySortMode: 0 44 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 45 | m_DefaultRenderingPath: 1 46 | m_DefaultMobileRenderingPath: 1 47 | m_TierSettings: [] 48 | m_LightmapStripping: 0 49 | m_FogStripping: 0 50 | m_InstancingStripping: 0 51 | m_LightmapKeepPlain: 1 52 | m_LightmapKeepDirCombined: 1 53 | m_LightmapKeepDynamicPlain: 1 54 | m_LightmapKeepDynamicDirCombined: 1 55 | m_LightmapKeepShadowMask: 1 56 | m_LightmapKeepSubtractive: 1 57 | m_FogKeepLinear: 1 58 | m_FogKeepExp: 1 59 | m_FogKeepExp2: 1 60 | m_AlbedoSwatchInfos: [] 61 | m_LightsUseLinearIntensity: 0 62 | m_LightsUseColorTemperature: 0 63 | -------------------------------------------------------------------------------- /Assets/_Scripts/BodyLeanPoseProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | using UnityEngine.SpatialTracking; 6 | using UnityEngine.Experimental.XR.Interaction; 7 | 8 | public class BodyLeanPoseProvider : BasePoseProvider 9 | { 10 | [Tooltip("Distance in the horizontal plane that the head can move before this body position will follow.")] 11 | public float followDistance= 0.5f; 12 | private PlayerClimb m_PlayerClimb; 13 | private PlayerWalk m_PlayerWalk; 14 | private Rigidbody m_RigRigidbody; 15 | Pose LastPose; 16 | 17 | private void Awake() 18 | { 19 | PlayerReferences PlayerRefs = gameObject.GetComponentInParent(); 20 | m_PlayerClimb = PlayerRefs.playerClimb; 21 | m_PlayerWalk = PlayerRefs.playerWalk; 22 | m_RigRigidbody = PlayerRefs.rigRigidbody; 23 | } 24 | 25 | private void Start() 26 | { 27 | LastPose = Pose.identity; 28 | } 29 | 30 | public override PoseDataFlags GetPoseFromProvider(out Pose output) 31 | { 32 | Pose HeadPose; 33 | 34 | if (PoseDataSource.GetDataFromSource(TrackedPoseDriver.TrackedPose.Head, out HeadPose) == PoseDataFlags.NoData) 35 | { 36 | output = LastPose; 37 | return PoseDataFlags.NoData; 38 | } 39 | 40 | output.rotation = HeadPose.rotation; 41 | 42 | float Distance = Vector2.Distance(new Vector2(HeadPose.position.x, HeadPose.position.z), new Vector2(LastPose.position.x, LastPose.position.z)); 43 | // climbing - snap to head pos 44 | if (m_PlayerClimb.Climbing) 45 | output.position = HeadPose.position; 46 | // beyond distance - correct it 47 | else 48 | { 49 | Vector3 LastPoseNewHeadHeightPosition = new Vector3(LastPose.position.x, HeadPose.position.y, LastPose.position.z); 50 | Vector3 LastPoseFollowPositionAdjustment = (followDistance * (LastPoseNewHeadHeightPosition - HeadPose.position).normalized); 51 | Vector3 MoveTowardsCenterAdjustment = (HeadPose.position - LastPoseNewHeadHeightPosition).normalized * 0.005f; 52 | 53 | if (Distance > followDistance && !m_PlayerWalk.moving) 54 | output.position = HeadPose.position + LastPoseFollowPositionAdjustment; 55 | else if (Distance > followDistance && m_PlayerWalk.moving) 56 | output.position = HeadPose.position + LastPoseFollowPositionAdjustment + MoveTowardsCenterAdjustment; 57 | else if (m_PlayerWalk.moving) 58 | output.position = LastPoseNewHeadHeightPosition + MoveTowardsCenterAdjustment; 59 | else 60 | { 61 | output.position = LastPoseNewHeadHeightPosition; 62 | } 63 | } 64 | 65 | LastPose = output; 66 | return PoseDataFlags.Position | PoseDataFlags.Rotation; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Assets/_Scripts/ConfigurableJointExtensions.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | // https://gist.github.com/mstevenson/4958837 4 | 5 | public static class ConfigurableJointExtensions 6 | { 7 | /// 8 | /// Sets a joint's targetRotation to match a given local rotation. 9 | /// The joint transform's local rotation must be cached on Start and passed into this method. 10 | /// 11 | public static void SetTargetRotationLocal(this ConfigurableJoint joint, Quaternion targetLocalRotation, Quaternion startLocalRotation) 12 | { 13 | if (joint.configuredInWorldSpace) 14 | { 15 | Debug.LogError("SetTargetRotationLocal should not be used with joints that are configured in world space. For world space joints, use SetTargetRotation.", joint); 16 | } 17 | SetTargetRotationInternal(joint, targetLocalRotation, startLocalRotation, Space.Self); 18 | } 19 | 20 | /// 21 | /// Sets a joint's targetRotation to match a given world rotation. 22 | /// The joint transform's world rotation must be cached on Start and passed into this method. 23 | /// 24 | public static void SetTargetRotation(this ConfigurableJoint joint, Quaternion targetWorldRotation, Quaternion startWorldRotation) 25 | { 26 | if (!joint.configuredInWorldSpace) 27 | { 28 | Debug.LogError("SetTargetRotation must be used with joints that are configured in world space. For local space joints, use SetTargetRotationLocal.", joint); 29 | } 30 | SetTargetRotationInternal(joint, targetWorldRotation, startWorldRotation, Space.World); 31 | } 32 | 33 | static void SetTargetRotationInternal(ConfigurableJoint joint, Quaternion targetRotation, Quaternion startRotation, Space space) 34 | { 35 | // Calculate the rotation expressed by the joint's axis and secondary axis 36 | var right = joint.axis; 37 | var forward = Vector3.Cross(joint.axis, joint.secondaryAxis).normalized; 38 | var up = Vector3.Cross(forward, right).normalized; 39 | Quaternion worldToJointSpace = Quaternion.LookRotation(forward, up); 40 | 41 | // Transform into world space 42 | Quaternion resultRotation = Quaternion.Inverse(worldToJointSpace); 43 | 44 | // Counter-rotate and apply the new local rotation. 45 | // Joint space is the inverse of world space, so we need to invert our value 46 | if (space == Space.World) 47 | { 48 | resultRotation *= startRotation * Quaternion.Inverse(targetRotation); 49 | } 50 | else 51 | { 52 | resultRotation *= Quaternion.Inverse(targetRotation) * startRotation; 53 | } 54 | 55 | // Transform back into joint space 56 | resultRotation *= worldToJointSpace; 57 | 58 | // Set target rotation to our newly calculated rotation 59 | joint.targetRotation = resultRotation; 60 | } 61 | } -------------------------------------------------------------------------------- /Assets/_Scripts/PlayerClimb.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | [RequireComponent(typeof(PlayerReferences))] 6 | public class PlayerClimb : MonoBehaviour 7 | { 8 | public BodyColliderBehaviour GravityColliderScript; 9 | 10 | private Rigidbody m_Rigidbody; 11 | 12 | private PlayerInput_Interactor m_ClimbInfluencer; 13 | private Vector3 m_ClimbXRRigReference; 14 | private Vector3 m_CollisionCorrection; 15 | 16 | private Vector3 m_BodyCollisionPosition; 17 | private Vector3 m_LastKnownGoodPosition; 18 | private bool m_Colliding; 19 | private float m_CorrectionRecoveryRate = 0.01f; 20 | 21 | public bool Climbing 22 | { 23 | get 24 | { 25 | return (m_ClimbInfluencer != null); 26 | } 27 | } 28 | 29 | void Awake() 30 | { 31 | m_Rigidbody = GetComponent().rigRigidbody; 32 | 33 | m_ClimbInfluencer = null; 34 | m_CollisionCorrection = Vector3.zero; 35 | } 36 | 37 | public void AddInfluencer(PlayerInput_Interactor NewInfluencer) 38 | { 39 | if (m_ClimbInfluencer == NewInfluencer) 40 | return; 41 | 42 | if (m_ClimbInfluencer == null) 43 | GravityColliderScript.CollisionStatusChanged += HandleCollision; 44 | 45 | m_ClimbInfluencer = NewInfluencer; 46 | m_Rigidbody.useGravity = false; 47 | m_Rigidbody.velocity = Vector3.zero; 48 | 49 | ResetReferences(); 50 | } 51 | 52 | public void RemoveInfluencer(PlayerInput_Interactor InfluencerToRemove) 53 | { 54 | if (m_ClimbInfluencer != InfluencerToRemove) 55 | return; 56 | 57 | m_ClimbInfluencer = null; 58 | GravityColliderScript.CollisionStatusChanged -= HandleCollision; 59 | m_Rigidbody.useGravity = true; 60 | m_CollisionCorrection = Vector3.zero; 61 | m_Colliding = false; 62 | m_Rigidbody.AddForce(-3f * InfluencerToRemove.velocities.Velocity, ForceMode.VelocityChange); // fling 63 | } 64 | 65 | // Update is called once per frame 66 | void Update() 67 | { 68 | if (!m_Colliding) 69 | { 70 | m_LastKnownGoodPosition = m_Rigidbody.position; 71 | } 72 | 73 | if (m_ClimbInfluencer != null) 74 | { 75 | Vector3 TargetPositionDelta = m_ClimbInfluencer.XRRigTargetDelta; 76 | 77 | if (m_Colliding) 78 | m_CollisionCorrection += m_LastKnownGoodPosition - m_BodyCollisionPosition; 79 | else if (m_CollisionCorrection != Vector3.zero) 80 | { 81 | m_CollisionCorrection -= m_CollisionCorrection.normalized * Mathf.Min(m_CorrectionRecoveryRate, m_CollisionCorrection.magnitude); 82 | } 83 | 84 | m_Rigidbody.MovePosition( 85 | m_ClimbXRRigReference 86 | + m_CollisionCorrection 87 | + TargetPositionDelta 88 | ); 89 | } 90 | } 91 | 92 | void HandleCollision(Transform transform, bool colliding) 93 | { 94 | m_Colliding = colliding; 95 | 96 | if (m_Colliding) 97 | m_BodyCollisionPosition = m_Rigidbody.position; 98 | } 99 | 100 | void ResetReferences() 101 | { 102 | m_ClimbXRRigReference = m_Rigidbody.position; 103 | 104 | m_ClimbInfluencer?.ResetReference(); 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /Assets/_Scripts/PlayerWalk.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | [RequireComponent(typeof(PlayerReferences))] 6 | public class PlayerWalk : MonoBehaviour 7 | { 8 | public float moveSpeed = 2f; 9 | 10 | Rigidbody m_Rigidbody; 11 | PlayerInput m_PlayerInput; 12 | PlayerClimb m_PlayerClimb; 13 | PlayerReferences m_PlayerReferences; 14 | 15 | public bool moving { get; private set; } = false; 16 | bool m_LeftIsDriving = false; // true if left hand is driving, false if right 17 | 18 | Vector2 m_MoveDirection = Vector2.zero; 19 | 20 | // Start is called before the first frame update 21 | void Awake() 22 | { 23 | m_PlayerReferences = GetComponent(); 24 | m_PlayerInput = m_PlayerReferences.playerInput; 25 | m_PlayerClimb = m_PlayerReferences.playerClimb; 26 | m_Rigidbody = m_PlayerReferences.rigRigidbody; 27 | } 28 | 29 | private void Update() 30 | { 31 | if (m_PlayerClimb.Climbing) 32 | moving = false; 33 | 34 | if (moving && (m_MoveDirection != Vector2.zero)) 35 | { 36 | // zero out previous walk speed 37 | m_Rigidbody.AddForce(-(new Vector3(m_Rigidbody.velocity.x, 0, m_Rigidbody.velocity.z)), ForceMode.VelocityChange); 38 | 39 | // set walk speed relative to controller pointing direction 40 | Vector3 NewWalkDirection = new Vector3(m_MoveDirection.x, 0, m_MoveDirection.y); 41 | if (m_LeftIsDriving) 42 | m_Rigidbody.AddForce(TransformMoveDirectionToHandSpaceAndMoveScale(NewWalkDirection, m_PlayerReferences.leftHand.transform.rotation), ForceMode.VelocityChange); 43 | else 44 | m_Rigidbody.AddForce(TransformMoveDirectionToHandSpaceAndMoveScale(NewWalkDirection, m_PlayerReferences.rightHand.transform.rotation), ForceMode.VelocityChange); 45 | } 46 | } 47 | 48 | Vector3 TransformMoveDirectionToHandSpaceAndMoveScale(Vector3 newWalkVector, Quaternion handRotation) 49 | { 50 | return moveSpeed * Vector3.ProjectOnPlane((handRotation * newWalkVector), Vector3.up).normalized; 51 | } 52 | 53 | private void OnEnable() 54 | { 55 | m_PlayerInput.Primary2DAxisTouchInputEvent_Left += HandleTouchLeft; 56 | m_PlayerInput.Primary2DAxisTouchInputEvent_Right += HandleTouchRight; 57 | 58 | m_PlayerInput.Primary2DAxisInputEvent_Left += HandleAxisLeft; 59 | m_PlayerInput.Primary2DAxisInputEvent_Right += HandleAxisRight; 60 | } 61 | 62 | private void OnDisable() 63 | { 64 | m_MoveDirection = Vector2.zero; 65 | 66 | m_PlayerInput.Primary2DAxisTouchInputEvent_Left -= HandleTouchLeft; 67 | m_PlayerInput.Primary2DAxisTouchInputEvent_Right -= HandleTouchRight; 68 | 69 | m_PlayerInput.Primary2DAxisInputEvent_Left -= HandleAxisLeft; 70 | m_PlayerInput.Primary2DAxisInputEvent_Right -= HandleAxisRight; 71 | } 72 | 73 | void HandleTouchLeft(bool value) 74 | { 75 | if (value) 76 | { 77 | moving = true; 78 | m_LeftIsDriving = true; 79 | } 80 | else if (!value && m_LeftIsDriving) 81 | { 82 | Stop(); 83 | } 84 | } 85 | 86 | void HandleTouchRight(bool value) 87 | { 88 | if (value) 89 | { 90 | moving = true; 91 | m_LeftIsDriving = false; 92 | } 93 | else if (!value && !m_LeftIsDriving) 94 | { 95 | Stop(); 96 | } 97 | } 98 | 99 | void HandleAxisLeft(Vector2 value) 100 | { 101 | if (!(moving && m_LeftIsDriving)) 102 | return; 103 | 104 | m_MoveDirection = value; 105 | } 106 | 107 | void HandleAxisRight(Vector2 value) 108 | { 109 | if (!(moving && !m_LeftIsDriving)) 110 | return; 111 | 112 | m_MoveDirection = value; 113 | } 114 | 115 | void Stop() 116 | { 117 | moving = false; 118 | } 119 | } 120 | 121 | -------------------------------------------------------------------------------- /Assets/_Prefabs/Climbable.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &940602533454575715 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 940602533454575717} 12 | - component: {fileID: 940602533454575716} 13 | - component: {fileID: 940602533454575719} 14 | - component: {fileID: 940602533454575718} 15 | - component: {fileID: 940602533454575713} 16 | - component: {fileID: 940602533454575712} 17 | m_Layer: 0 18 | m_Name: Climbable 19 | m_TagString: Untagged 20 | m_Icon: {fileID: 0} 21 | m_NavMeshLayer: 0 22 | m_StaticEditorFlags: 0 23 | m_IsActive: 1 24 | --- !u!4 &940602533454575717 25 | Transform: 26 | m_ObjectHideFlags: 0 27 | m_CorrespondingSourceObject: {fileID: 0} 28 | m_PrefabInstance: {fileID: 0} 29 | m_PrefabAsset: {fileID: 0} 30 | m_GameObject: {fileID: 940602533454575715} 31 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 32 | m_LocalPosition: {x: 0.784, y: 1.178, z: -0.7} 33 | m_LocalScale: {x: 0.3, y: 0.3, z: 0.3} 34 | m_Children: [] 35 | m_Father: {fileID: 0} 36 | m_RootOrder: 0 37 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 38 | --- !u!33 &940602533454575716 39 | MeshFilter: 40 | m_ObjectHideFlags: 0 41 | m_CorrespondingSourceObject: {fileID: 0} 42 | m_PrefabInstance: {fileID: 0} 43 | m_PrefabAsset: {fileID: 0} 44 | m_GameObject: {fileID: 940602533454575715} 45 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 46 | --- !u!23 &940602533454575719 47 | MeshRenderer: 48 | m_ObjectHideFlags: 0 49 | m_CorrespondingSourceObject: {fileID: 0} 50 | m_PrefabInstance: {fileID: 0} 51 | m_PrefabAsset: {fileID: 0} 52 | m_GameObject: {fileID: 940602533454575715} 53 | m_Enabled: 1 54 | m_CastShadows: 1 55 | m_ReceiveShadows: 1 56 | m_DynamicOccludee: 1 57 | m_MotionVectors: 1 58 | m_LightProbeUsage: 1 59 | m_ReflectionProbeUsage: 1 60 | m_RenderingLayerMask: 1 61 | m_RendererPriority: 0 62 | m_Materials: 63 | - {fileID: 2100000, guid: d36bcb34057cb6a48af9c25fb99455ab, type: 2} 64 | m_StaticBatchInfo: 65 | firstSubMesh: 0 66 | subMeshCount: 0 67 | m_StaticBatchRoot: {fileID: 0} 68 | m_ProbeAnchor: {fileID: 0} 69 | m_LightProbeVolumeOverride: {fileID: 0} 70 | m_ScaleInLightmap: 1 71 | m_PreserveUVs: 0 72 | m_IgnoreNormalsForChartDetection: 0 73 | m_ImportantGI: 0 74 | m_StitchLightmapSeams: 0 75 | m_SelectedEditorRenderState: 3 76 | m_MinimumChartSize: 4 77 | m_AutoUVMaxDistance: 0.5 78 | m_AutoUVMaxAngle: 89 79 | m_LightmapParameters: {fileID: 0} 80 | m_SortingLayerID: 0 81 | m_SortingLayer: 0 82 | m_SortingOrder: 0 83 | --- !u!65 &940602533454575718 84 | BoxCollider: 85 | m_ObjectHideFlags: 0 86 | m_CorrespondingSourceObject: {fileID: 0} 87 | m_PrefabInstance: {fileID: 0} 88 | m_PrefabAsset: {fileID: 0} 89 | m_GameObject: {fileID: 940602533454575715} 90 | m_Material: {fileID: 0} 91 | m_IsTrigger: 0 92 | m_Enabled: 1 93 | serializedVersion: 2 94 | m_Size: {x: 1, y: 1, z: 1} 95 | m_Center: {x: 0, y: 0, z: 0} 96 | --- !u!54 &940602533454575713 97 | Rigidbody: 98 | m_ObjectHideFlags: 0 99 | m_CorrespondingSourceObject: {fileID: 0} 100 | m_PrefabInstance: {fileID: 0} 101 | m_PrefabAsset: {fileID: 0} 102 | m_GameObject: {fileID: 940602533454575715} 103 | serializedVersion: 2 104 | m_Mass: 1 105 | m_Drag: 0 106 | m_AngularDrag: 0.05 107 | m_UseGravity: 0 108 | m_IsKinematic: 1 109 | m_Interpolate: 0 110 | m_Constraints: 0 111 | m_CollisionDetection: 0 112 | --- !u!114 &940602533454575712 113 | MonoBehaviour: 114 | m_ObjectHideFlags: 0 115 | m_CorrespondingSourceObject: {fileID: 0} 116 | m_PrefabInstance: {fileID: 0} 117 | m_PrefabAsset: {fileID: 0} 118 | m_GameObject: {fileID: 940602533454575715} 119 | m_Enabled: 1 120 | m_EditorHideFlags: 0 121 | m_Script: {fileID: 11500000, guid: edc9974ea4c7445408dcf3961f157415, type: 3} 122 | m_Name: 123 | m_EditorClassIdentifier: 124 | type: 1 125 | StickyGrab: 0 126 | -------------------------------------------------------------------------------- /Assets/_Prefabs/Grabable.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &8717109809206867692 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 8717109809206867606} 12 | - component: {fileID: 8717109809206867601} 13 | - component: {fileID: 8717109809206867600} 14 | - component: {fileID: 8717109809206867603} 15 | - component: {fileID: 8717109809206867602} 16 | - component: {fileID: 8717109809206867693} 17 | m_Layer: 0 18 | m_Name: Grabable 19 | m_TagString: Untagged 20 | m_Icon: {fileID: 0} 21 | m_NavMeshLayer: 0 22 | m_StaticEditorFlags: 0 23 | m_IsActive: 1 24 | --- !u!4 &8717109809206867606 25 | Transform: 26 | m_ObjectHideFlags: 0 27 | m_CorrespondingSourceObject: {fileID: 0} 28 | m_PrefabInstance: {fileID: 0} 29 | m_PrefabAsset: {fileID: 0} 30 | m_GameObject: {fileID: 8717109809206867692} 31 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 32 | m_LocalPosition: {x: 0.046, y: 0.698, z: 0} 33 | m_LocalScale: {x: 0.3, y: 0.3, z: 0.3} 34 | m_Children: [] 35 | m_Father: {fileID: 0} 36 | m_RootOrder: 0 37 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 38 | --- !u!33 &8717109809206867601 39 | MeshFilter: 40 | m_ObjectHideFlags: 0 41 | m_CorrespondingSourceObject: {fileID: 0} 42 | m_PrefabInstance: {fileID: 0} 43 | m_PrefabAsset: {fileID: 0} 44 | m_GameObject: {fileID: 8717109809206867692} 45 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 46 | --- !u!23 &8717109809206867600 47 | MeshRenderer: 48 | m_ObjectHideFlags: 0 49 | m_CorrespondingSourceObject: {fileID: 0} 50 | m_PrefabInstance: {fileID: 0} 51 | m_PrefabAsset: {fileID: 0} 52 | m_GameObject: {fileID: 8717109809206867692} 53 | m_Enabled: 1 54 | m_CastShadows: 1 55 | m_ReceiveShadows: 1 56 | m_DynamicOccludee: 1 57 | m_MotionVectors: 1 58 | m_LightProbeUsage: 1 59 | m_ReflectionProbeUsage: 1 60 | m_RenderingLayerMask: 1 61 | m_RendererPriority: 0 62 | m_Materials: 63 | - {fileID: 2100000, guid: d36bcb34057cb6a48af9c25fb99455ab, type: 2} 64 | m_StaticBatchInfo: 65 | firstSubMesh: 0 66 | subMeshCount: 0 67 | m_StaticBatchRoot: {fileID: 0} 68 | m_ProbeAnchor: {fileID: 0} 69 | m_LightProbeVolumeOverride: {fileID: 0} 70 | m_ScaleInLightmap: 1 71 | m_PreserveUVs: 0 72 | m_IgnoreNormalsForChartDetection: 0 73 | m_ImportantGI: 0 74 | m_StitchLightmapSeams: 0 75 | m_SelectedEditorRenderState: 3 76 | m_MinimumChartSize: 4 77 | m_AutoUVMaxDistance: 0.5 78 | m_AutoUVMaxAngle: 89 79 | m_LightmapParameters: {fileID: 0} 80 | m_SortingLayerID: 0 81 | m_SortingLayer: 0 82 | m_SortingOrder: 0 83 | --- !u!65 &8717109809206867603 84 | BoxCollider: 85 | m_ObjectHideFlags: 0 86 | m_CorrespondingSourceObject: {fileID: 0} 87 | m_PrefabInstance: {fileID: 0} 88 | m_PrefabAsset: {fileID: 0} 89 | m_GameObject: {fileID: 8717109809206867692} 90 | m_Material: {fileID: 0} 91 | m_IsTrigger: 0 92 | m_Enabled: 1 93 | serializedVersion: 2 94 | m_Size: {x: 1, y: 1, z: 1} 95 | m_Center: {x: 0, y: 0, z: 0} 96 | --- !u!54 &8717109809206867602 97 | Rigidbody: 98 | m_ObjectHideFlags: 0 99 | m_CorrespondingSourceObject: {fileID: 0} 100 | m_PrefabInstance: {fileID: 0} 101 | m_PrefabAsset: {fileID: 0} 102 | m_GameObject: {fileID: 8717109809206867692} 103 | serializedVersion: 2 104 | m_Mass: 1 105 | m_Drag: 0 106 | m_AngularDrag: 0.05 107 | m_UseGravity: 1 108 | m_IsKinematic: 0 109 | m_Interpolate: 0 110 | m_Constraints: 0 111 | m_CollisionDetection: 0 112 | --- !u!114 &8717109809206867693 113 | MonoBehaviour: 114 | m_ObjectHideFlags: 0 115 | m_CorrespondingSourceObject: {fileID: 0} 116 | m_PrefabInstance: {fileID: 0} 117 | m_PrefabAsset: {fileID: 0} 118 | m_GameObject: {fileID: 8717109809206867692} 119 | m_Enabled: 1 120 | m_EditorHideFlags: 0 121 | m_Script: {fileID: 11500000, guid: edc9974ea4c7445408dcf3961f157415, type: 3} 122 | m_Name: 123 | m_EditorClassIdentifier: 124 | type: 0 125 | StickyGrab: 0 126 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 4 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | excludedTargetPlatforms: [] 44 | - serializedVersion: 2 45 | name: Low 46 | pixelLightCount: 0 47 | shadows: 0 48 | shadowResolution: 0 49 | shadowProjection: 1 50 | shadowCascades: 1 51 | shadowDistance: 20 52 | shadowNearPlaneOffset: 3 53 | shadowCascade2Split: 0.33333334 54 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 55 | shadowmaskMode: 0 56 | blendWeights: 2 57 | textureQuality: 0 58 | anisotropicTextures: 0 59 | antiAliasing: 0 60 | softParticles: 0 61 | softVegetation: 0 62 | realtimeReflectionProbes: 0 63 | billboardsFaceCameraPosition: 0 64 | vSyncCount: 0 65 | lodBias: 0.4 66 | maximumLODLevel: 0 67 | streamingMipmapsActive: 0 68 | streamingMipmapsAddAllCameras: 1 69 | streamingMipmapsMemoryBudget: 512 70 | streamingMipmapsRenderersPerFrame: 512 71 | streamingMipmapsMaxLevelReduction: 2 72 | streamingMipmapsMaxFileIORequests: 1024 73 | particleRaycastBudget: 16 74 | asyncUploadTimeSlice: 2 75 | asyncUploadBufferSize: 16 76 | asyncUploadPersistentBuffer: 1 77 | resolutionScalingFixedDPIFactor: 1 78 | excludedTargetPlatforms: [] 79 | - serializedVersion: 2 80 | name: Medium 81 | pixelLightCount: 1 82 | shadows: 1 83 | shadowResolution: 0 84 | shadowProjection: 1 85 | shadowCascades: 1 86 | shadowDistance: 20 87 | shadowNearPlaneOffset: 3 88 | shadowCascade2Split: 0.33333334 89 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 90 | shadowmaskMode: 0 91 | blendWeights: 2 92 | textureQuality: 0 93 | anisotropicTextures: 1 94 | antiAliasing: 0 95 | softParticles: 0 96 | softVegetation: 0 97 | realtimeReflectionProbes: 0 98 | billboardsFaceCameraPosition: 0 99 | vSyncCount: 1 100 | lodBias: 0.7 101 | maximumLODLevel: 0 102 | streamingMipmapsActive: 0 103 | streamingMipmapsAddAllCameras: 1 104 | streamingMipmapsMemoryBudget: 512 105 | streamingMipmapsRenderersPerFrame: 512 106 | streamingMipmapsMaxLevelReduction: 2 107 | streamingMipmapsMaxFileIORequests: 1024 108 | particleRaycastBudget: 64 109 | asyncUploadTimeSlice: 2 110 | asyncUploadBufferSize: 16 111 | asyncUploadPersistentBuffer: 1 112 | resolutionScalingFixedDPIFactor: 1 113 | excludedTargetPlatforms: [] 114 | - serializedVersion: 2 115 | name: High 116 | pixelLightCount: 2 117 | shadows: 2 118 | shadowResolution: 1 119 | shadowProjection: 1 120 | shadowCascades: 2 121 | shadowDistance: 40 122 | shadowNearPlaneOffset: 3 123 | shadowCascade2Split: 0.33333334 124 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 125 | shadowmaskMode: 1 126 | blendWeights: 2 127 | textureQuality: 0 128 | anisotropicTextures: 1 129 | antiAliasing: 2 130 | softParticles: 0 131 | softVegetation: 1 132 | realtimeReflectionProbes: 1 133 | billboardsFaceCameraPosition: 1 134 | vSyncCount: 1 135 | lodBias: 1 136 | maximumLODLevel: 0 137 | streamingMipmapsActive: 0 138 | streamingMipmapsAddAllCameras: 1 139 | streamingMipmapsMemoryBudget: 512 140 | streamingMipmapsRenderersPerFrame: 512 141 | streamingMipmapsMaxLevelReduction: 2 142 | streamingMipmapsMaxFileIORequests: 1024 143 | particleRaycastBudget: 256 144 | asyncUploadTimeSlice: 2 145 | asyncUploadBufferSize: 16 146 | asyncUploadPersistentBuffer: 1 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Very High 151 | pixelLightCount: 3 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 2 156 | shadowDistance: 40 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 1 164 | antiAliasing: 4 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 1.5 171 | maximumLODLevel: 0 172 | streamingMipmapsActive: 0 173 | streamingMipmapsAddAllCameras: 1 174 | streamingMipmapsMemoryBudget: 512 175 | streamingMipmapsRenderersPerFrame: 512 176 | streamingMipmapsMaxLevelReduction: 2 177 | streamingMipmapsMaxFileIORequests: 1024 178 | particleRaycastBudget: 1024 179 | asyncUploadTimeSlice: 2 180 | asyncUploadBufferSize: 16 181 | asyncUploadPersistentBuffer: 1 182 | resolutionScalingFixedDPIFactor: 1 183 | excludedTargetPlatforms: [] 184 | - serializedVersion: 2 185 | name: Ultra 186 | pixelLightCount: 4 187 | shadows: 2 188 | shadowResolution: 2 189 | shadowProjection: 1 190 | shadowCascades: 4 191 | shadowDistance: 150 192 | shadowNearPlaneOffset: 3 193 | shadowCascade2Split: 0.33333334 194 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 195 | shadowmaskMode: 1 196 | blendWeights: 4 197 | textureQuality: 0 198 | anisotropicTextures: 1 199 | antiAliasing: 4 200 | softParticles: 1 201 | softVegetation: 1 202 | realtimeReflectionProbes: 1 203 | billboardsFaceCameraPosition: 1 204 | vSyncCount: 1 205 | lodBias: 2 206 | maximumLODLevel: 0 207 | streamingMipmapsActive: 0 208 | streamingMipmapsAddAllCameras: 1 209 | streamingMipmapsMemoryBudget: 512 210 | streamingMipmapsRenderersPerFrame: 512 211 | streamingMipmapsMaxLevelReduction: 2 212 | streamingMipmapsMaxFileIORequests: 1024 213 | particleRaycastBudget: 4096 214 | asyncUploadTimeSlice: 2 215 | asyncUploadBufferSize: 16 216 | asyncUploadPersistentBuffer: 1 217 | resolutionScalingFixedDPIFactor: 1 218 | excludedTargetPlatforms: [] 219 | m_PerPlatformDefaultQuality: {} 220 | -------------------------------------------------------------------------------- /Assets/_Scripts/PlayerInput.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | using UnityEngine.XR; 7 | 8 | public class PlayerInput : MonoBehaviour 9 | { 10 | private bool GripValue_Left; 11 | private bool GripValue_Right; 12 | private bool TriggerValue_Left; 13 | private bool TriggerValue_Right; 14 | private bool MenuValue_Left; 15 | private bool MenuValue_Right; 16 | private bool PrimaryAxis2DTouch_Left; 17 | private bool PrimaryAxis2DTouch_Right; 18 | private bool PrimaryAxis2DClick_Left; 19 | private bool PrimaryAxis2DClick_Right; 20 | private float TriggerAxisValue_Left; 21 | private float TriggerAxisValue_Right; 22 | private Vector2 PrimaryAxis2DValue_Left; 23 | private Vector2 PrimaryAxis2DValue_Right; 24 | 25 | private float TriggerThreshold = 0.9f; 26 | 27 | public delegate void BoolEventHandler(bool value); 28 | public delegate void FloatEventHandler(float value); 29 | public delegate void Vector2EventHandler(Vector2 value); 30 | 31 | public event BoolEventHandler GripInputEvent_Left; 32 | public event BoolEventHandler GripInputEvent_Right; 33 | public event BoolEventHandler TriggerInputEvent_Left; 34 | public event BoolEventHandler TriggerInputEvent_Right; 35 | public event BoolEventHandler MenuInputEvent_Left; 36 | public event BoolEventHandler MenuInputEvent_Right; 37 | public event BoolEventHandler Primary2DAxisTouchInputEvent_Left; 38 | public event BoolEventHandler Primary2DAxisTouchInputEvent_Right; 39 | public event BoolEventHandler Primary2DAxisClickInputEvent_Left; 40 | public event BoolEventHandler Primary2DAxisClickInputEvent_Right; 41 | public event FloatEventHandler TriggerAxisInputEvent_Left; 42 | public event FloatEventHandler TriggerAxisInputEvent_Right; 43 | public event Vector2EventHandler Primary2DAxisInputEvent_Left; 44 | public event Vector2EventHandler Primary2DAxisInputEvent_Right; 45 | 46 | public enum HandSource 47 | { 48 | Left, 49 | Right 50 | } 51 | 52 | public enum Actions 53 | { 54 | Grip, 55 | Trigger, 56 | Primary2DAxis, 57 | Menu 58 | } 59 | 60 | private void Start() 61 | { 62 | UpdateInputs(); 63 | } 64 | 65 | private void Update() 66 | { 67 | UpdateInputs(); 68 | } 69 | 70 | public bool GetBoolValue(Actions action, HandSource hand) 71 | { 72 | if (hand == HandSource.Left) 73 | { 74 | switch (action) 75 | { 76 | case Actions.Grip: 77 | return GripValue_Left; 78 | case Actions.Trigger: 79 | return TriggerValue_Left; 80 | case Actions.Menu: 81 | return MenuValue_Left; 82 | } 83 | } 84 | else 85 | { 86 | switch (action) 87 | { 88 | case Actions.Grip: 89 | return GripValue_Right; 90 | case Actions.Trigger: 91 | return TriggerValue_Right; 92 | case Actions.Menu: 93 | return MenuValue_Right; 94 | } 95 | } 96 | 97 | Debug.LogError("No bool action \"" + action + "\" found in PlayerInput"); 98 | return false; 99 | } 100 | 101 | public Vector2 GetVector2Value(Actions action, HandSource hand) 102 | { 103 | if (hand == HandSource.Left) 104 | { 105 | switch (action) 106 | { 107 | case Actions.Primary2DAxis: 108 | return PrimaryAxis2DValue_Left; 109 | } 110 | } 111 | else 112 | { 113 | switch (action) 114 | { 115 | case Actions.Primary2DAxis: 116 | return PrimaryAxis2DValue_Right; 117 | } 118 | } 119 | 120 | Debug.LogError("No Vector2 action \"" + action + "\" found in PlayerInput"); 121 | return new Vector2(); 122 | } 123 | 124 | private void UpdateInputs() 125 | { 126 | if (GripValue_Left != Input.GetButton("XR_Left_Grip")) 127 | { 128 | GripValue_Left = Input.GetButton("XR_Left_Grip"); 129 | GripInputEvent_Left?.Invoke(GripValue_Left); 130 | } 131 | 132 | if (GripValue_Right != Input.GetButton("XR_Right_Grip")) 133 | { 134 | GripValue_Right = Input.GetButton("XR_Right_Grip"); 135 | GripInputEvent_Right?.Invoke(GripValue_Right); 136 | } 137 | 138 | if (TriggerAxisValue_Left != Input.GetAxis("XR_Left_Trigger_Axis")) 139 | { 140 | TriggerAxisValue_Left = Input.GetAxis("XR_Left_Trigger_Axis"); 141 | TriggerAxisInputEvent_Left?.Invoke(TriggerAxisValue_Left); 142 | } 143 | 144 | if (TriggerAxisValue_Right != Input.GetAxis("XR_Right_Trigger_Axis")) 145 | { 146 | TriggerAxisValue_Right = Input.GetAxis("XR_Right_Trigger_Axis"); 147 | TriggerAxisInputEvent_Right?.Invoke(TriggerAxisValue_Right); 148 | } 149 | 150 | bool newTriggerValue_Left = (TriggerAxisValue_Left > TriggerThreshold); 151 | bool newTriggerValue_Right = (TriggerAxisValue_Right > TriggerThreshold); 152 | 153 | if (TriggerValue_Left != newTriggerValue_Left) 154 | { 155 | TriggerValue_Left = newTriggerValue_Left; 156 | TriggerInputEvent_Left?.Invoke(TriggerValue_Left); 157 | } 158 | 159 | if (TriggerValue_Right != newTriggerValue_Right) 160 | { 161 | TriggerValue_Right = newTriggerValue_Right; 162 | TriggerInputEvent_Right?.Invoke(TriggerValue_Right); 163 | } 164 | 165 | if (MenuValue_Left != Input.GetButton("XR_Left_Menu")) 166 | { 167 | MenuValue_Left = Input.GetButton("XR_Left_Menu"); 168 | MenuInputEvent_Left?.Invoke(MenuValue_Left); 169 | } 170 | 171 | if (MenuValue_Right != Input.GetButton("XR_Right_Menu")) 172 | { 173 | MenuValue_Right = Input.GetButton("XR_Right_Menu"); 174 | MenuInputEvent_Right?.Invoke(MenuValue_Right); 175 | } 176 | 177 | if (PrimaryAxis2DTouch_Left != Input.GetButton("XR_Left_Primary2DAxisTouch")) 178 | { 179 | PrimaryAxis2DTouch_Left = Input.GetButton("XR_Left_Primary2DAxisTouch"); 180 | Primary2DAxisTouchInputEvent_Left?.Invoke(PrimaryAxis2DTouch_Left); 181 | } 182 | 183 | if (PrimaryAxis2DTouch_Right != Input.GetButton("XR_Right_Primary2DAxisTouch")) 184 | { 185 | PrimaryAxis2DTouch_Right = Input.GetButton("XR_Right_Primary2DAxisTouch"); 186 | Primary2DAxisTouchInputEvent_Right?.Invoke(PrimaryAxis2DTouch_Right); 187 | } 188 | 189 | if (PrimaryAxis2DClick_Left != Input.GetButton("XR_Left_Primary2DAxisClick")) 190 | { 191 | PrimaryAxis2DClick_Left = Input.GetButton("XR_Left_Primary2DAxisClick"); 192 | Primary2DAxisClickInputEvent_Left?.Invoke(PrimaryAxis2DClick_Left); 193 | } 194 | 195 | if (PrimaryAxis2DClick_Right != Input.GetButton("XR_Right_Primary2DAxisClick")) 196 | { 197 | PrimaryAxis2DClick_Right = Input.GetButton("XR_Right_Primary2DAxisClick"); 198 | Primary2DAxisClickInputEvent_Right?.Invoke(PrimaryAxis2DClick_Right); 199 | } 200 | 201 | if (PrimaryAxis2DValue_Left.x != Input.GetAxis("XR_Left_Primary2DAxisX") || 202 | PrimaryAxis2DValue_Left.y != Input.GetAxis("XR_Left_Primary2DAxisY")) 203 | { 204 | PrimaryAxis2DValue_Left.x = Input.GetAxis("XR_Left_Primary2DAxisX"); 205 | PrimaryAxis2DValue_Left.y = Input.GetAxis("XR_Left_Primary2DAxisY"); 206 | Primary2DAxisInputEvent_Left?.Invoke(PrimaryAxis2DValue_Left); 207 | } 208 | 209 | if (PrimaryAxis2DValue_Right.x != Input.GetAxis("XR_Right_Primary2DAxisX") || 210 | PrimaryAxis2DValue_Right.y != Input.GetAxis("XR_Right_Primary2DAxisY")) 211 | { 212 | PrimaryAxis2DValue_Right.x = Input.GetAxis("XR_Right_Primary2DAxisX"); 213 | PrimaryAxis2DValue_Right.y = Input.GetAxis("XR_Right_Primary2DAxisY"); 214 | Primary2DAxisInputEvent_Right?.Invoke(PrimaryAxis2DValue_Right); 215 | } 216 | } 217 | } 218 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: XR_Left_Primary2DAxisX 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: 13 | positiveButton: 14 | altNegativeButton: 15 | altPositiveButton: 16 | gravity: 0 17 | dead: 0.1 18 | sensitivity: 1 19 | snap: 0 20 | invert: 0 21 | type: 2 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Horizontal 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: 29 | positiveButton: 30 | altNegativeButton: 31 | altPositiveButton: 32 | gravity: 0 33 | dead: 0.1 34 | sensitivity: 1 35 | snap: 0 36 | invert: 0 37 | type: 2 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: XR_Left_Primary2DAxisY 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: 46 | altNegativeButton: 47 | altPositiveButton: 48 | gravity: 0 49 | dead: 0.1 50 | sensitivity: 1 51 | snap: 0 52 | invert: 1 53 | type: 2 54 | axis: 1 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Vertical 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: 62 | altNegativeButton: 63 | altPositiveButton: 64 | gravity: 0 65 | dead: 0.1 66 | sensitivity: 1 67 | snap: 0 68 | invert: 1 69 | type: 2 70 | axis: 1 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: XR_Right_Primary2DAxisX 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: 78 | altNegativeButton: 79 | altPositiveButton: 80 | gravity: 0 81 | dead: 0.1 82 | sensitivity: 1 83 | snap: 0 84 | invert: 0 85 | type: 2 86 | axis: 3 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: XR_Right_Primary2DAxisY 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 0 97 | dead: 0.1 98 | sensitivity: 1 99 | snap: 0 100 | invert: 1 101 | type: 2 102 | axis: 4 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: XR_Left_Trigger_Axis 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0.001 114 | sensitivity: 1 115 | snap: 0 116 | invert: 0 117 | type: 2 118 | axis: 8 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: XR_Right_Trigger_Axis 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0.001 130 | sensitivity: 1 131 | snap: 0 132 | invert: 0 133 | type: 2 134 | axis: 9 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: XR_Left_Grip 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: joystick button 4 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0 147 | snap: 0 148 | invert: 0 149 | type: 2 150 | axis: 0 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: XR_Right_Grip 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: joystick button 5 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0 162 | sensitivity: 0 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: XR_Left_Menu 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: joystick button 6 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0 178 | sensitivity: 0 179 | snap: 0 180 | invert: 0 181 | type: 2 182 | axis: 0 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: XR_Right_Menu 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 7 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 0 193 | dead: 0 194 | sensitivity: 0 195 | snap: 0 196 | invert: 0 197 | type: 2 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: XR_Left_Primary2DAxisTouch 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 16 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 0 209 | dead: 0 210 | sensitivity: 0 211 | snap: 0 212 | invert: 0 213 | type: 2 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: XR_Right_Primary2DAxisTouch 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 17 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 0 225 | dead: 0 226 | sensitivity: 0 227 | snap: 0 228 | invert: 0 229 | type: 2 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: XR_Left_Primary2DAxisClick 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 8 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 0 241 | dead: 0 242 | sensitivity: 0 243 | snap: 0 244 | invert: 0 245 | type: 2 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: XR_Right_Primary2DAxisClick 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: joystick button 9 254 | altNegativeButton: 255 | altPositiveButton: 256 | gravity: 0 257 | dead: 0 258 | sensitivity: 0 259 | snap: 0 260 | invert: 0 261 | type: 2 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: joystick button 0 270 | altNegativeButton: 271 | altPositiveButton: joystick button 2 272 | gravity: 0 273 | dead: 0 274 | sensitivity: 0 275 | snap: 0 276 | invert: 0 277 | type: 2 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: joystick button 1 286 | altNegativeButton: 287 | altPositiveButton: joystick button 3 288 | gravity: 0 289 | dead: 0 290 | sensitivity: 0 291 | snap: 0 292 | invert: 0 293 | type: 2 294 | axis: 0 295 | joyNum: 0 296 | - serializedVersion: 3 297 | m_Name: Mouse X 298 | descriptiveName: 299 | descriptiveNegativeName: 300 | negativeButton: 301 | positiveButton: 302 | altNegativeButton: 303 | altPositiveButton: 304 | gravity: 0 305 | dead: 0 306 | sensitivity: 0 307 | snap: 0 308 | invert: 0 309 | type: 1 310 | axis: 0 311 | joyNum: 0 312 | - serializedVersion: 3 313 | m_Name: Mouse Y 314 | descriptiveName: 315 | descriptiveNegativeName: 316 | negativeButton: 317 | positiveButton: 318 | altNegativeButton: 319 | altPositiveButton: 320 | gravity: 0 321 | dead: 0 322 | sensitivity: 0 323 | snap: 0 324 | invert: 0 325 | type: 1 326 | axis: 1 327 | joyNum: 0 328 | - serializedVersion: 3 329 | m_Name: Mouse ScrollWheel 330 | descriptiveName: 331 | descriptiveNegativeName: 332 | negativeButton: 333 | positiveButton: 334 | altNegativeButton: 335 | altPositiveButton: 336 | gravity: 0 337 | dead: 0 338 | sensitivity: 0 339 | snap: 0 340 | invert: 0 341 | type: 1 342 | axis: 2 343 | joyNum: 0 344 | -------------------------------------------------------------------------------- /Assets/_Scripts/PlayerInput_Interactor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | [RequireComponent(typeof(Rigidbody))] 6 | public class PlayerInput_Interactor : MonoBehaviour 7 | { 8 | public PlayerInput.HandSource hand; 9 | public Rigidbody xrRigRigidbody; 10 | public PlayerClimb climbScript; 11 | public VelocitiesFromTransform velocities; 12 | 13 | private PlayerInput InputSource; 14 | 15 | private Transform MyTransform; 16 | public Rigidbody MyRigidbody { get; private set; } 17 | 18 | public Vector3 XRRigTargetDelta 19 | { 20 | get 21 | { 22 | if (Climbing) 23 | { 24 | return -((MyRigidbody.position - xrRigRigidbody.position) - ClimbReference); 25 | } 26 | else 27 | return Vector3.zero; 28 | } 29 | } 30 | 31 | public bool HoldingSomething { get { return (HeldObject != null); } } 32 | 33 | private GameObject HeldObject = null; 34 | private Interactable HeldObjectInteractable = null; 35 | private GameObject TargetObject; 36 | private bool waitingOnFirstRelease = false; 37 | private ConfigurableJoint grabJoint; 38 | private bool Climbing = false; 39 | private Vector3 ClimbReference; 40 | 41 | private Quaternion grabJointStartRotation; 42 | 43 | // Start is called before the first frame update 44 | void Awake() 45 | { 46 | InputSource = gameObject.GetComponentInParent().playerInput; 47 | MyTransform = transform; 48 | MyRigidbody = GetComponent(); 49 | } 50 | 51 | private void OnEnable() 52 | { 53 | if (hand == PlayerInput.HandSource.Left) 54 | InputSource.TriggerInputEvent_Left += HandleGrab; 55 | else 56 | InputSource.TriggerInputEvent_Right += HandleGrab; 57 | } 58 | 59 | private void OnDisable() 60 | { 61 | if (hand == PlayerInput.HandSource.Left) 62 | InputSource.TriggerInputEvent_Left -= HandleGrab; 63 | else 64 | InputSource.TriggerInputEvent_Right -= HandleGrab; 65 | } 66 | 67 | private void OnTriggerEnter(Collider other) 68 | { 69 | if (other.GetComponent() != null) 70 | TargetObject = other.gameObject; 71 | } 72 | 73 | private void OnTriggerExit(Collider other) 74 | { 75 | if (TargetObject == other.gameObject) 76 | TargetObject = null; 77 | } 78 | 79 | public bool TryGrab(GameObject ObjectToGrab) 80 | { 81 | Interactable ObjectToGrabInteractable = ObjectToGrab.GetComponent(); 82 | 83 | if (HeldObject != null || ObjectToGrab == null || ObjectToGrabInteractable == null || ObjectToGrabInteractable.type != Interactable.InteractableType.Grabable) 84 | return false; 85 | 86 | // yes, this is duplicated from HandleGrab. No good reason other than code cleanliness. Necessary for public calls, and I'm not interested in reafactoring right now. 87 | HeldObject = ObjectToGrab; 88 | HeldObjectInteractable = HeldObject.GetComponent(); 89 | 90 | GrabObject(ObjectToGrab); 91 | return true; 92 | } 93 | 94 | void GrabObject(GameObject ObjectToGrab) 95 | { 96 | Interactable ObjectToGrabInteractable = ObjectToGrab.GetComponent(); 97 | ObjectToGrabInteractable.Grab(this); 98 | CreateJoint(ObjectToGrab); 99 | waitingOnFirstRelease = ObjectToGrabInteractable.StickyGrab; 100 | } 101 | 102 | // Entry into grabbing. value indicates state of button - true for starting a grab or false for ending a grab 103 | public void HandleGrab(bool value) 104 | { 105 | // Grab on press down 106 | if (value && HeldObject == null && TargetObject != null) 107 | { 108 | HeldObject = TargetObject; 109 | HeldObjectInteractable = HeldObject.GetComponent(); 110 | 111 | if (HeldObjectInteractable.type == Interactable.InteractableType.JustEvents) 112 | HeldObjectInteractable.Grab(this); 113 | else if (HeldObjectInteractable.type == Interactable.InteractableType.Grabable 114 | || HeldObjectInteractable.type == Interactable.InteractableType.JointManipulator) 115 | { 116 | GrabObject(HeldObject); 117 | } 118 | else if (climbScript != null 119 | && HeldObjectInteractable.type == Interactable.InteractableType.Climbable) 120 | { 121 | climbScript.AddInfluencer(this); 122 | Climbing = true; 123 | ResetReference(); 124 | } 125 | } 126 | else if (!value && waitingOnFirstRelease) 127 | { 128 | waitingOnFirstRelease = false; 129 | } 130 | // Release on second release 131 | else if (!value) 132 | { 133 | ForceDrop(); 134 | } 135 | } 136 | 137 | public void ForceDrop() 138 | { 139 | waitingOnFirstRelease = false; 140 | if (HeldObject != null) 141 | { 142 | var tempObject = HeldObject; 143 | 144 | if (HeldObjectInteractable.type == Interactable.InteractableType.Grabable) 145 | { 146 | if (grabJoint) 147 | DestroyJoint(); 148 | 149 | Vector3 RadiusVector = HeldObject.transform.position - MyTransform.position; 150 | HeldObject.GetComponent().AddForce(velocities.Velocity + Vector3.Cross(velocities.AngularVelocity, RadiusVector), ForceMode.VelocityChange); 151 | HeldObject.GetComponent().AddTorque(velocities.AngularVelocity / (1 + RadiusVector.magnitude), ForceMode.VelocityChange); 152 | } 153 | else if (HeldObjectInteractable.type == Interactable.InteractableType.Climbable) 154 | { 155 | climbScript.RemoveInfluencer(this); 156 | Climbing = false; 157 | } 158 | else if (HeldObjectInteractable.type == Interactable.InteractableType.JointManipulator) 159 | { 160 | if (grabJoint) 161 | DestroyJoint(); 162 | 163 | Vector3 RadiusVector = HeldObject.transform.position - MyTransform.position; 164 | HeldObject.GetComponent().AddForce(velocities.Velocity + Vector3.Cross(velocities.AngularVelocity, RadiusVector), ForceMode.VelocityChange); 165 | } 166 | 167 | HeldObject = null; 168 | HeldObjectInteractable = null; 169 | tempObject.GetComponent().Drop(); 170 | } 171 | } 172 | 173 | void CreateJoint(GameObject obj) 174 | { 175 | grabJoint = gameObject.AddComponent(); 176 | 177 | // from fixedjoint 178 | grabJoint.breakForce = 1500f; 179 | grabJoint.connectedBody = obj.GetComponent(); 180 | 181 | // configurablejoint additions - make it behave like a fixed joint 182 | grabJoint.xMotion = ConfigurableJointMotion.Locked; 183 | grabJoint.yMotion = ConfigurableJointMotion.Locked; 184 | grabJoint.zMotion = ConfigurableJointMotion.Locked; 185 | grabJoint.angularXMotion = ConfigurableJointMotion.Locked; 186 | grabJoint.angularYMotion = ConfigurableJointMotion.Locked; 187 | grabJoint.angularZMotion = ConfigurableJointMotion.Locked; 188 | 189 | if (!HeldObjectInteractable.RelativeAnchor) 190 | { 191 | grabJoint.autoConfigureConnectedAnchor = false; 192 | grabJoint.connectedAnchor = Vector3.zero; 193 | grabJoint.anchor = Vector3.zero; 194 | 195 | grabJoint.angularXMotion = ConfigurableJointMotion.Free; 196 | grabJoint.angularYMotion = ConfigurableJointMotion.Free; 197 | grabJoint.angularZMotion = ConfigurableJointMotion.Free; 198 | 199 | JointDrive drive = new JointDrive(); 200 | drive.positionSpring = 100f; 201 | drive.positionDamper = 15f; 202 | drive.maximumForce = Mathf.Infinity; 203 | grabJoint.slerpDrive = drive; 204 | grabJoint.rotationDriveMode = RotationDriveMode.Slerp; 205 | grabJoint.configuredInWorldSpace = false; 206 | grabJointStartRotation = MyRigidbody.rotation; 207 | grabJoint.SetTargetRotationLocal(grabJoint.connectedBody.rotation, grabJointStartRotation); 208 | } 209 | } 210 | 211 | private void OnJointBreak(float breakForce) 212 | { 213 | ForceDrop(); 214 | } 215 | 216 | void DestroyJoint() 217 | { 218 | grabJoint.connectedBody = null; 219 | Destroy(grabJoint); 220 | } 221 | 222 | public void ResetReference() 223 | { 224 | ClimbReference = (MyRigidbody.position - xrRigRigidbody.position); 225 | } 226 | 227 | public void SetGrabJointTargetRotation(Quaternion targetRotation) 228 | { 229 | //grabJoint.SetTargetRotationLocal(grabJoint.connectedBody.rotation, MyRigidbody.rotation); 230 | 231 | //grabJoint.configuredInWorldSpace = false; 232 | grabJoint.SetTargetRotationLocal(targetRotation, grabJointStartRotation); 233 | } 234 | } 235 | -------------------------------------------------------------------------------- /ProjectSettings/ProBuilderSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "m_Dictionary": { 3 | "m_DictionaryValues": [ 4 | { 5 | "type": "UnityEngine.ProBuilder.SemVer, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", 6 | "key": "about.identifier", 7 | "value": "{\"m_Value\":{\"m_Major\":4,\"m_Minor\":0,\"m_Patch\":5,\"m_Build\":-1,\"m_Type\":\"\",\"m_Metadata\":\"\",\"m_Date\":\"2019/05/08\"}}" 8 | }, 9 | { 10 | "type": "UnityEngine.ProBuilder.SemVer, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", 11 | "key": "preferences.version", 12 | "value": "{\"m_Value\":{\"m_Major\":4,\"m_Minor\":0,\"m_Patch\":5,\"m_Build\":-1,\"m_Type\":\"\",\"m_Metadata\":\"\",\"m_Date\":\"2019/05/08\"}}" 13 | }, 14 | { 15 | "type": "UnityEngine.ProBuilder.LogLevel, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", 16 | "key": "log.level", 17 | "value": "{\"m_Value\":3}" 18 | }, 19 | { 20 | "type": "UnityEngine.ProBuilder.LogOutput, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", 21 | "key": "log.output", 22 | "value": "{\"m_Value\":1}" 23 | }, 24 | { 25 | "type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 26 | "key": "log.path", 27 | "value": "{\"m_Value\":\"ProBuilderLog.txt\"}" 28 | }, 29 | { 30 | "type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 31 | "key": "editor.materialPalettePath", 32 | "value": "{\"m_Value\":\"Assets/ProBuilder Data/Default Material Palette.asset\"}" 33 | }, 34 | { 35 | "type": "UnityEngine.ProBuilder.PivotLocation, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", 36 | "key": "mesh.newShapePivotLocation", 37 | "value": "{\"m_Value\":1}" 38 | }, 39 | { 40 | "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 41 | "key": "mesh.newShapesSnapToGrid", 42 | "value": "{\"m_Value\":true}" 43 | }, 44 | { 45 | "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 46 | "key": "lightmapping.autoUnwrapLightmapUV", 47 | "value": "{\"m_Value\":true}" 48 | }, 49 | { 50 | "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 51 | "key": "editor.autoRecalculateCollisions", 52 | "value": "{\"m_Value\":false}" 53 | }, 54 | { 55 | "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 56 | "key": "mesh.meshColliderIsConvex", 57 | "value": "{\"m_Value\":false}" 58 | }, 59 | { 60 | "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 61 | "key": "UnityEngine.ProBuilder.ProBuilderEditor-isUtilityWindow", 62 | "value": "{\"m_Value\":false}" 63 | }, 64 | { 65 | "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 66 | "key": "editor.backFaceSelectEnabled", 67 | "value": "{\"m_Value\":false}" 68 | }, 69 | { 70 | "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 71 | "key": "editor.toolbarIconGUI", 72 | "value": "{\"m_Value\":false}" 73 | }, 74 | { 75 | "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 76 | "key": "editor.showSceneInfo", 77 | "value": "{\"m_Value\":false}" 78 | }, 79 | { 80 | "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 81 | "key": "editor.closeWindowAfterShapeCreation", 82 | "value": "{\"m_Value\":false}" 83 | }, 84 | { 85 | "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 86 | "key": "editor.showEditorNotifications", 87 | "value": "{\"m_Value\":false}" 88 | }, 89 | { 90 | "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 91 | "key": "UVEditor.showPreviewMaterial", 92 | "value": "{\"m_Value\":true}" 93 | }, 94 | { 95 | "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 96 | "key": "GrowSelection.useAngle", 97 | "value": "{\"m_Value\":true}" 98 | }, 99 | { 100 | "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 101 | "key": "GrowSelection.iterativeGrow", 102 | "value": "{\"m_Value\":false}" 103 | }, 104 | { 105 | "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 106 | "key": "editor.extrudeEdgesAsGroup", 107 | "value": "{\"m_Value\":true}" 108 | }, 109 | { 110 | "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 111 | "key": "CollapseVertices.collapseToFirst", 112 | "value": "{\"m_Value\":true}" 113 | }, 114 | { 115 | "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 116 | "key": "FillHole.selectEntirePath", 117 | "value": "{\"m_Value\":false}" 118 | }, 119 | { 120 | "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 121 | "key": "SelectMaterial.restrictToSelectedObjects", 122 | "value": "{\"m_Value\":false}" 123 | }, 124 | { 125 | "type": "UnityEngine.Rendering.ShadowCastingMode, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", 126 | "key": "mesh.shadowCastingMode", 127 | "value": "{\"m_Value\":1}" 128 | }, 129 | { 130 | "type": "UnityEngine.Material, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", 131 | "key": "mesh.userMaterial", 132 | "value": "{\"m_Value\":{\"instanceID\":0}}" 133 | }, 134 | { 135 | "type": "UnityEditor.StaticEditorFlags, UnityEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", 136 | "key": "mesh.defaultStaticEditorFlags", 137 | "value": "{\"m_Value\":0}" 138 | }, 139 | { 140 | "type": "UnityEngine.ProBuilder.ColliderType, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", 141 | "key": "mesh.newShapeColliderType", 142 | "value": "{\"m_Value\":2}" 143 | }, 144 | { 145 | "type": "UnityEngine.ProBuilder.UnwrapParameters, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", 146 | "key": "lightmapping.defaultLightmapUnwrapParameters", 147 | "value": "{\"m_Value\":{\"m_HardAngle\":88.0,\"m_PackMargin\":20.0,\"m_AngleError\":8.0,\"m_AreaError\":15.0}}" 148 | }, 149 | { 150 | "type": "UnityEngine.ProBuilder.SelectionModifierBehavior, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", 151 | "key": "editor.rectSelectModifier", 152 | "value": "{\"m_Value\":2}" 153 | }, 154 | { 155 | "type": "UnityEngine.ProBuilder.RectSelectMode, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", 156 | "key": "editor.dragSelectRectMode", 157 | "value": "{\"m_Value\":0}" 158 | }, 159 | { 160 | "type": "UnityEngine.ProBuilder.SelectMode, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", 161 | "key": "editor.selectMode", 162 | "value": "{\"m_Value\":1}" 163 | }, 164 | { 165 | "type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 166 | "key": "uv.uvEditorGridSnapIncrement", 167 | "value": "{\"m_Value\":0.125}" 168 | }, 169 | { 170 | "type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 171 | "key": "GrowSelection.angleValue", 172 | "value": "{\"m_Value\":15.0}" 173 | }, 174 | { 175 | "type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 176 | "key": "ExtrudeEdges.distance", 177 | "value": "{\"m_Value\":0.5}" 178 | }, 179 | { 180 | "type": "UnityEngine.ProBuilder.ExtrudeMethod, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", 181 | "key": "editor.extrudeMethod", 182 | "value": "{\"m_Value\":2}" 183 | }, 184 | { 185 | "type": "System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", 186 | "key": "SubdivideEdges.subdivisions", 187 | "value": "{\"m_Value\":4}" 188 | } 189 | ] 190 | } 191 | } -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 18 7 | productGUID: 94441c51a89a46d428bfec9b99c2ef23 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: CastleVR 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 53 | iosShowActivityIndicatorOnLoading: -1 54 | androidShowActivityIndicatorOnLoading: -1 55 | displayResolutionDialog: 1 56 | iosUseCustomAppBackgroundBehavior: 0 57 | iosAllowHTTPDownload: 1 58 | allowedAutorotateToPortrait: 1 59 | allowedAutorotateToPortraitUpsideDown: 1 60 | allowedAutorotateToLandscapeRight: 1 61 | allowedAutorotateToLandscapeLeft: 1 62 | useOSAutorotation: 1 63 | use32BitDisplayBuffer: 1 64 | preserveFramebufferAlpha: 0 65 | disableDepthAndStencilBuffers: 0 66 | androidStartInFullscreen: 1 67 | androidRenderOutsideSafeArea: 0 68 | androidUseSwappy: 0 69 | androidBlitType: 0 70 | defaultIsNativeResolution: 1 71 | macRetinaSupport: 1 72 | runInBackground: 1 73 | captureSingleScreen: 0 74 | muteOtherAudioSources: 0 75 | Prepare IOS For Recording: 0 76 | Force IOS Speakers When Recording: 0 77 | deferSystemGesturesMode: 0 78 | hideHomeButton: 0 79 | submitAnalytics: 1 80 | usePlayerLog: 1 81 | bakeCollisionMeshes: 0 82 | forceSingleInstance: 0 83 | useFlipModelSwapchain: 1 84 | resizableWindow: 0 85 | useMacAppStoreValidation: 0 86 | macAppStoreCategory: public.app-category.games 87 | gpuSkinning: 1 88 | graphicsJobs: 0 89 | xboxPIXTextureCapture: 0 90 | xboxEnableAvatar: 0 91 | xboxEnableKinect: 0 92 | xboxEnableKinectAutoTracking: 0 93 | xboxEnableFitness: 0 94 | visibleInBackground: 1 95 | allowFullscreenSwitch: 1 96 | graphicsJobMode: 0 97 | fullscreenMode: 1 98 | xboxSpeechDB: 0 99 | xboxEnableHeadOrientation: 0 100 | xboxEnableGuest: 0 101 | xboxEnablePIXSampling: 0 102 | metalFramebufferOnly: 0 103 | xboxOneResolution: 0 104 | xboxOneSResolution: 0 105 | xboxOneXResolution: 3 106 | xboxOneMonoLoggingLevel: 0 107 | xboxOneLoggingLevel: 1 108 | xboxOneDisableEsram: 0 109 | xboxOnePresentImmediateThreshold: 0 110 | switchQueueCommandMemory: 0 111 | switchQueueControlMemory: 16384 112 | switchQueueComputeMemory: 262144 113 | switchNVNShaderPoolsGranularity: 33554432 114 | switchNVNDefaultPoolsGranularity: 16777216 115 | switchNVNOtherPoolsGranularity: 16777216 116 | vulkanEnableSetSRGBWrite: 0 117 | m_SupportedAspectRatios: 118 | 4:3: 1 119 | 5:4: 1 120 | 16:10: 1 121 | 16:9: 1 122 | Others: 1 123 | bundleVersion: 0.1 124 | preloadedAssets: [] 125 | metroInputSource: 0 126 | wsaTransparentSwapchain: 0 127 | m_HolographicPauseOnTrackingLoss: 1 128 | xboxOneDisableKinectGpuReservation: 0 129 | xboxOneEnable7thCore: 0 130 | vrSettings: 131 | cardboard: 132 | depthFormat: 0 133 | enableTransitionView: 0 134 | daydream: 135 | depthFormat: 0 136 | useSustainedPerformanceMode: 0 137 | enableVideoLayer: 0 138 | useProtectedVideoMemory: 0 139 | minimumSupportedHeadTracking: 0 140 | maximumSupportedHeadTracking: 1 141 | hololens: 142 | depthFormat: 1 143 | depthBufferSharingEnabled: 0 144 | lumin: 145 | depthFormat: 0 146 | frameTiming: 2 147 | enableGLCache: 0 148 | glCacheMaxBlobSize: 524288 149 | glCacheMaxFileSize: 8388608 150 | oculus: 151 | sharedDepthBuffer: 1 152 | dashSupport: 1 153 | lowOverheadMode: 0 154 | enable360StereoCapture: 0 155 | isWsaHolographicRemotingEnabled: 0 156 | protectGraphicsMemory: 0 157 | enableFrameTimingStats: 0 158 | useHDRDisplay: 0 159 | m_ColorGamuts: 00000000 160 | targetPixelDensity: 30 161 | resolutionScalingMode: 0 162 | androidSupportedAspectRatio: 1 163 | androidMaxAspectRatio: 2.1 164 | applicationIdentifier: {} 165 | buildNumber: {} 166 | AndroidBundleVersionCode: 1 167 | AndroidMinSdkVersion: 16 168 | AndroidTargetSdkVersion: 0 169 | AndroidPreferredInstallLocation: 1 170 | aotOptions: 171 | stripEngineCode: 1 172 | iPhoneStrippingLevel: 0 173 | iPhoneScriptCallOptimization: 0 174 | ForceInternetPermission: 0 175 | ForceSDCardPermission: 0 176 | CreateWallpaper: 0 177 | APKExpansionFiles: 0 178 | keepLoadedShadersAlive: 0 179 | StripUnusedMeshComponents: 1 180 | VertexChannelCompressionMask: 4054 181 | iPhoneSdkVersion: 988 182 | iOSTargetOSVersionString: 9.0 183 | tvOSSdkVersion: 0 184 | tvOSRequireExtendedGameController: 0 185 | tvOSTargetOSVersionString: 9.0 186 | uIPrerenderedIcon: 0 187 | uIRequiresPersistentWiFi: 0 188 | uIRequiresFullScreen: 1 189 | uIStatusBarHidden: 1 190 | uIExitOnSuspend: 0 191 | uIStatusBarStyle: 0 192 | iPhoneSplashScreen: {fileID: 0} 193 | iPhoneHighResSplashScreen: {fileID: 0} 194 | iPhoneTallHighResSplashScreen: {fileID: 0} 195 | iPhone47inSplashScreen: {fileID: 0} 196 | iPhone55inPortraitSplashScreen: {fileID: 0} 197 | iPhone55inLandscapeSplashScreen: {fileID: 0} 198 | iPhone58inPortraitSplashScreen: {fileID: 0} 199 | iPhone58inLandscapeSplashScreen: {fileID: 0} 200 | iPadPortraitSplashScreen: {fileID: 0} 201 | iPadHighResPortraitSplashScreen: {fileID: 0} 202 | iPadLandscapeSplashScreen: {fileID: 0} 203 | iPadHighResLandscapeSplashScreen: {fileID: 0} 204 | iPhone65inPortraitSplashScreen: {fileID: 0} 205 | iPhone65inLandscapeSplashScreen: {fileID: 0} 206 | iPhone61inPortraitSplashScreen: {fileID: 0} 207 | iPhone61inLandscapeSplashScreen: {fileID: 0} 208 | appleTVSplashScreen: {fileID: 0} 209 | appleTVSplashScreen2x: {fileID: 0} 210 | tvOSSmallIconLayers: [] 211 | tvOSSmallIconLayers2x: [] 212 | tvOSLargeIconLayers: [] 213 | tvOSLargeIconLayers2x: [] 214 | tvOSTopShelfImageLayers: [] 215 | tvOSTopShelfImageLayers2x: [] 216 | tvOSTopShelfImageWideLayers: [] 217 | tvOSTopShelfImageWideLayers2x: [] 218 | iOSLaunchScreenType: 0 219 | iOSLaunchScreenPortrait: {fileID: 0} 220 | iOSLaunchScreenLandscape: {fileID: 0} 221 | iOSLaunchScreenBackgroundColor: 222 | serializedVersion: 2 223 | rgba: 0 224 | iOSLaunchScreenFillPct: 100 225 | iOSLaunchScreenSize: 100 226 | iOSLaunchScreenCustomXibPath: 227 | iOSLaunchScreeniPadType: 0 228 | iOSLaunchScreeniPadImage: {fileID: 0} 229 | iOSLaunchScreeniPadBackgroundColor: 230 | serializedVersion: 2 231 | rgba: 0 232 | iOSLaunchScreeniPadFillPct: 100 233 | iOSLaunchScreeniPadSize: 100 234 | iOSLaunchScreeniPadCustomXibPath: 235 | iOSUseLaunchScreenStoryboard: 0 236 | iOSLaunchScreenCustomStoryboardPath: 237 | iOSDeviceRequirements: [] 238 | iOSURLSchemes: [] 239 | iOSBackgroundModes: 0 240 | iOSMetalForceHardShadows: 0 241 | metalEditorSupport: 1 242 | metalAPIValidation: 1 243 | iOSRenderExtraFrameOnPause: 0 244 | appleDeveloperTeamID: 245 | iOSManualSigningProvisioningProfileID: 246 | tvOSManualSigningProvisioningProfileID: 247 | iOSManualSigningProvisioningProfileType: 0 248 | tvOSManualSigningProvisioningProfileType: 0 249 | appleEnableAutomaticSigning: 0 250 | iOSRequireARKit: 0 251 | iOSAutomaticallyDetectAndAddCapabilities: 1 252 | appleEnableProMotion: 0 253 | clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea 254 | templatePackageId: com.unity.template.3d@1.0.4 255 | templateDefaultScene: Assets/Scenes/SampleScene.unity 256 | AndroidTargetArchitectures: 5 257 | AndroidSplashScreenScale: 0 258 | androidSplashScreen: {fileID: 0} 259 | AndroidKeystoreName: '{inproject}: ' 260 | AndroidKeyaliasName: 261 | AndroidBuildApkPerCpuArchitecture: 0 262 | AndroidTVCompatibility: 1 263 | AndroidIsGame: 1 264 | AndroidEnableTango: 0 265 | androidEnableBanner: 1 266 | androidUseLowAccuracyLocation: 0 267 | androidUseCustomKeystore: 0 268 | m_AndroidBanners: 269 | - width: 320 270 | height: 180 271 | banner: {fileID: 0} 272 | androidGamepadSupportLevel: 0 273 | AndroidValidateAppBundleSize: 1 274 | AndroidAppBundleSizeToValidate: 150 275 | resolutionDialogBanner: {fileID: 0} 276 | m_BuildTargetIcons: [] 277 | m_BuildTargetPlatformIcons: [] 278 | m_BuildTargetBatching: 279 | - m_BuildTarget: Standalone 280 | m_StaticBatching: 1 281 | m_DynamicBatching: 0 282 | - m_BuildTarget: tvOS 283 | m_StaticBatching: 1 284 | m_DynamicBatching: 0 285 | - m_BuildTarget: Android 286 | m_StaticBatching: 1 287 | m_DynamicBatching: 0 288 | - m_BuildTarget: iPhone 289 | m_StaticBatching: 1 290 | m_DynamicBatching: 0 291 | - m_BuildTarget: WebGL 292 | m_StaticBatching: 0 293 | m_DynamicBatching: 0 294 | m_BuildTargetGraphicsAPIs: 295 | - m_BuildTarget: AndroidPlayer 296 | m_APIs: 0b00000008000000 297 | m_Automatic: 1 298 | - m_BuildTarget: iOSSupport 299 | m_APIs: 10000000 300 | m_Automatic: 1 301 | - m_BuildTarget: AppleTVSupport 302 | m_APIs: 10000000 303 | m_Automatic: 0 304 | - m_BuildTarget: WebGLSupport 305 | m_APIs: 0b000000 306 | m_Automatic: 1 307 | m_BuildTargetVRSettings: 308 | - m_BuildTarget: Standalone 309 | m_Enabled: 1 310 | m_Devices: 311 | - OpenVR 312 | openGLRequireES31: 0 313 | openGLRequireES31AEP: 0 314 | openGLRequireES32: 0 315 | vuforiaEnabled: 0 316 | m_TemplateCustomTags: {} 317 | mobileMTRendering: 318 | Android: 1 319 | iPhone: 1 320 | tvOS: 1 321 | m_BuildTargetGroupLightmapEncodingQuality: [] 322 | m_BuildTargetGroupLightmapSettings: [] 323 | playModeTestRunnerEnabled: 0 324 | runPlayModeTestAsEditModeTest: 0 325 | actionOnDotNetUnhandledException: 1 326 | enableInternalProfiler: 0 327 | logObjCUncaughtExceptions: 1 328 | enableCrashReportAPI: 0 329 | cameraUsageDescription: 330 | locationUsageDescription: 331 | microphoneUsageDescription: 332 | switchNetLibKey: 333 | switchSocketMemoryPoolSize: 6144 334 | switchSocketAllocatorPoolSize: 128 335 | switchSocketConcurrencyLimit: 14 336 | switchScreenResolutionBehavior: 2 337 | switchUseCPUProfiler: 0 338 | switchApplicationID: 0x01004b9000490000 339 | switchNSODependencies: 340 | switchTitleNames_0: 341 | switchTitleNames_1: 342 | switchTitleNames_2: 343 | switchTitleNames_3: 344 | switchTitleNames_4: 345 | switchTitleNames_5: 346 | switchTitleNames_6: 347 | switchTitleNames_7: 348 | switchTitleNames_8: 349 | switchTitleNames_9: 350 | switchTitleNames_10: 351 | switchTitleNames_11: 352 | switchTitleNames_12: 353 | switchTitleNames_13: 354 | switchTitleNames_14: 355 | switchPublisherNames_0: 356 | switchPublisherNames_1: 357 | switchPublisherNames_2: 358 | switchPublisherNames_3: 359 | switchPublisherNames_4: 360 | switchPublisherNames_5: 361 | switchPublisherNames_6: 362 | switchPublisherNames_7: 363 | switchPublisherNames_8: 364 | switchPublisherNames_9: 365 | switchPublisherNames_10: 366 | switchPublisherNames_11: 367 | switchPublisherNames_12: 368 | switchPublisherNames_13: 369 | switchPublisherNames_14: 370 | switchIcons_0: {fileID: 0} 371 | switchIcons_1: {fileID: 0} 372 | switchIcons_2: {fileID: 0} 373 | switchIcons_3: {fileID: 0} 374 | switchIcons_4: {fileID: 0} 375 | switchIcons_5: {fileID: 0} 376 | switchIcons_6: {fileID: 0} 377 | switchIcons_7: {fileID: 0} 378 | switchIcons_8: {fileID: 0} 379 | switchIcons_9: {fileID: 0} 380 | switchIcons_10: {fileID: 0} 381 | switchIcons_11: {fileID: 0} 382 | switchIcons_12: {fileID: 0} 383 | switchIcons_13: {fileID: 0} 384 | switchIcons_14: {fileID: 0} 385 | switchSmallIcons_0: {fileID: 0} 386 | switchSmallIcons_1: {fileID: 0} 387 | switchSmallIcons_2: {fileID: 0} 388 | switchSmallIcons_3: {fileID: 0} 389 | switchSmallIcons_4: {fileID: 0} 390 | switchSmallIcons_5: {fileID: 0} 391 | switchSmallIcons_6: {fileID: 0} 392 | switchSmallIcons_7: {fileID: 0} 393 | switchSmallIcons_8: {fileID: 0} 394 | switchSmallIcons_9: {fileID: 0} 395 | switchSmallIcons_10: {fileID: 0} 396 | switchSmallIcons_11: {fileID: 0} 397 | switchSmallIcons_12: {fileID: 0} 398 | switchSmallIcons_13: {fileID: 0} 399 | switchSmallIcons_14: {fileID: 0} 400 | switchManualHTML: 401 | switchAccessibleURLs: 402 | switchLegalInformation: 403 | switchMainThreadStackSize: 1048576 404 | switchPresenceGroupId: 405 | switchLogoHandling: 0 406 | switchReleaseVersion: 0 407 | switchDisplayVersion: 1.0.0 408 | switchStartupUserAccount: 0 409 | switchTouchScreenUsage: 0 410 | switchSupportedLanguagesMask: 0 411 | switchLogoType: 0 412 | switchApplicationErrorCodeCategory: 413 | switchUserAccountSaveDataSize: 0 414 | switchUserAccountSaveDataJournalSize: 0 415 | switchApplicationAttribute: 0 416 | switchCardSpecSize: -1 417 | switchCardSpecClock: -1 418 | switchRatingsMask: 0 419 | switchRatingsInt_0: 0 420 | switchRatingsInt_1: 0 421 | switchRatingsInt_2: 0 422 | switchRatingsInt_3: 0 423 | switchRatingsInt_4: 0 424 | switchRatingsInt_5: 0 425 | switchRatingsInt_6: 0 426 | switchRatingsInt_7: 0 427 | switchRatingsInt_8: 0 428 | switchRatingsInt_9: 0 429 | switchRatingsInt_10: 0 430 | switchRatingsInt_11: 0 431 | switchLocalCommunicationIds_0: 432 | switchLocalCommunicationIds_1: 433 | switchLocalCommunicationIds_2: 434 | switchLocalCommunicationIds_3: 435 | switchLocalCommunicationIds_4: 436 | switchLocalCommunicationIds_5: 437 | switchLocalCommunicationIds_6: 438 | switchLocalCommunicationIds_7: 439 | switchParentalControl: 0 440 | switchAllowsScreenshot: 1 441 | switchAllowsVideoCapturing: 1 442 | switchAllowsRuntimeAddOnContentInstall: 0 443 | switchDataLossConfirmation: 0 444 | switchUserAccountLockEnabled: 0 445 | switchSystemResourceMemory: 16777216 446 | switchSupportedNpadStyles: 3 447 | switchNativeFsCacheSize: 32 448 | switchIsHoldTypeHorizontal: 0 449 | switchSupportedNpadCount: 8 450 | switchSocketConfigEnabled: 0 451 | switchTcpInitialSendBufferSize: 32 452 | switchTcpInitialReceiveBufferSize: 64 453 | switchTcpAutoSendBufferSizeMax: 256 454 | switchTcpAutoReceiveBufferSizeMax: 256 455 | switchUdpSendBufferSize: 9 456 | switchUdpReceiveBufferSize: 42 457 | switchSocketBufferEfficiency: 4 458 | switchSocketInitializeEnabled: 1 459 | switchNetworkInterfaceManagerInitializeEnabled: 1 460 | switchPlayerConnectionEnabled: 1 461 | ps4NPAgeRating: 12 462 | ps4NPTitleSecret: 463 | ps4NPTrophyPackPath: 464 | ps4ParentalLevel: 11 465 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 466 | ps4Category: 0 467 | ps4MasterVersion: 01.00 468 | ps4AppVersion: 01.00 469 | ps4AppType: 0 470 | ps4ParamSfxPath: 471 | ps4VideoOutPixelFormat: 0 472 | ps4VideoOutInitialWidth: 1920 473 | ps4VideoOutBaseModeInitialWidth: 1920 474 | ps4VideoOutReprojectionRate: 60 475 | ps4PronunciationXMLPath: 476 | ps4PronunciationSIGPath: 477 | ps4BackgroundImagePath: 478 | ps4StartupImagePath: 479 | ps4StartupImagesFolder: 480 | ps4IconImagesFolder: 481 | ps4SaveDataImagePath: 482 | ps4SdkOverride: 483 | ps4BGMPath: 484 | ps4ShareFilePath: 485 | ps4ShareOverlayImagePath: 486 | ps4PrivacyGuardImagePath: 487 | ps4NPtitleDatPath: 488 | ps4RemotePlayKeyAssignment: -1 489 | ps4RemotePlayKeyMappingDir: 490 | ps4PlayTogetherPlayerCount: 0 491 | ps4EnterButtonAssignment: 1 492 | ps4ApplicationParam1: 0 493 | ps4ApplicationParam2: 0 494 | ps4ApplicationParam3: 0 495 | ps4ApplicationParam4: 0 496 | ps4DownloadDataSize: 0 497 | ps4GarlicHeapSize: 2048 498 | ps4ProGarlicHeapSize: 2560 499 | playerPrefsMaxSize: 32768 500 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 501 | ps4pnSessions: 1 502 | ps4pnPresence: 1 503 | ps4pnFriends: 1 504 | ps4pnGameCustomData: 1 505 | playerPrefsSupport: 0 506 | enableApplicationExit: 0 507 | resetTempFolder: 1 508 | restrictedAudioUsageRights: 0 509 | ps4UseResolutionFallback: 0 510 | ps4ReprojectionSupport: 0 511 | ps4UseAudio3dBackend: 0 512 | ps4SocialScreenEnabled: 0 513 | ps4ScriptOptimizationLevel: 0 514 | ps4Audio3dVirtualSpeakerCount: 14 515 | ps4attribCpuUsage: 0 516 | ps4PatchPkgPath: 517 | ps4PatchLatestPkgPath: 518 | ps4PatchChangeinfoPath: 519 | ps4PatchDayOne: 0 520 | ps4attribUserManagement: 0 521 | ps4attribMoveSupport: 0 522 | ps4attrib3DSupport: 0 523 | ps4attribShareSupport: 0 524 | ps4attribExclusiveVR: 0 525 | ps4disableAutoHideSplash: 0 526 | ps4videoRecordingFeaturesUsed: 0 527 | ps4contentSearchFeaturesUsed: 0 528 | ps4attribEyeToEyeDistanceSettingVR: 0 529 | ps4IncludedModules: [] 530 | monoEnv: 531 | splashScreenBackgroundSourceLandscape: {fileID: 0} 532 | splashScreenBackgroundSourcePortrait: {fileID: 0} 533 | blurSplashScreenBackground: 1 534 | spritePackerPolicy: 535 | webGLMemorySize: 256 536 | webGLExceptionSupport: 1 537 | webGLNameFilesAsHashes: 0 538 | webGLDataCaching: 1 539 | webGLDebugSymbols: 0 540 | webGLEmscriptenArgs: 541 | webGLModulesDirectory: 542 | webGLTemplate: APPLICATION:Default 543 | webGLAnalyzeBuildSize: 0 544 | webGLUseEmbeddedResources: 0 545 | webGLCompressionFormat: 1 546 | webGLLinkerTarget: 1 547 | webGLThreadsSupport: 0 548 | webGLWasmStreaming: 0 549 | scriptingDefineSymbols: {} 550 | platformArchitecture: {} 551 | scriptingBackend: {} 552 | il2cppCompilerConfiguration: {} 553 | managedStrippingLevel: {} 554 | incrementalIl2cppBuild: {} 555 | allowUnsafeCode: 0 556 | additionalIl2CppArgs: 557 | scriptingRuntimeVersion: 1 558 | gcIncremental: 0 559 | gcWBarrierValidation: 0 560 | apiCompatibilityLevelPerPlatform: {} 561 | m_RenderingPath: 1 562 | m_MobileRenderingPath: 1 563 | metroPackageName: Template_3D 564 | metroPackageVersion: 565 | metroCertificatePath: 566 | metroCertificatePassword: 567 | metroCertificateSubject: 568 | metroCertificateIssuer: 569 | metroCertificateNotAfter: 0000000000000000 570 | metroApplicationDescription: Template_3D 571 | wsaImages: {} 572 | metroTileShortName: 573 | metroTileShowName: 0 574 | metroMediumTileShowName: 0 575 | metroLargeTileShowName: 0 576 | metroWideTileShowName: 0 577 | metroSupportStreamingInstall: 0 578 | metroLastRequiredScene: 0 579 | metroDefaultTileSize: 1 580 | metroTileForegroundText: 2 581 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 582 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 583 | a: 1} 584 | metroSplashScreenUseBackgroundColor: 0 585 | platformCapabilities: {} 586 | metroTargetDeviceFamilies: {} 587 | metroFTAName: 588 | metroFTAFileTypes: [] 589 | metroProtocolName: 590 | XboxOneProductId: 591 | XboxOneUpdateKey: 592 | XboxOneSandboxId: 593 | XboxOneContentId: 594 | XboxOneTitleId: 595 | XboxOneSCId: 596 | XboxOneGameOsOverridePath: 597 | XboxOnePackagingOverridePath: 598 | XboxOneAppManifestOverridePath: 599 | XboxOneVersion: 1.0.0.0 600 | XboxOnePackageEncryption: 0 601 | XboxOnePackageUpdateGranularity: 2 602 | XboxOneDescription: 603 | XboxOneLanguage: 604 | - enus 605 | XboxOneCapability: [] 606 | XboxOneGameRating: {} 607 | XboxOneIsContentPackage: 0 608 | XboxOneEnableGPUVariability: 0 609 | XboxOneSockets: {} 610 | XboxOneSplashScreen: {fileID: 0} 611 | XboxOneAllowedProductIds: [] 612 | XboxOnePersistentLocalStorageSize: 0 613 | XboxOneXTitleMemory: 8 614 | xboxOneScriptCompiler: 1 615 | XboxOneOverrideIdentityName: 616 | vrEditorSettings: 617 | daydream: 618 | daydreamIconForeground: {fileID: 0} 619 | daydreamIconBackground: {fileID: 0} 620 | cloudServicesEnabled: 621 | UNet: 1 622 | luminIcon: 623 | m_Name: 624 | m_ModelFolderPath: 625 | m_PortalFolderPath: 626 | luminCert: 627 | m_CertPath: 628 | m_SignPackage: 1 629 | luminIsChannelApp: 0 630 | luminVersion: 631 | m_VersionCode: 1 632 | m_VersionName: 633 | facebookSdkVersion: 7.9.4 634 | facebookAppId: 635 | facebookCookies: 1 636 | facebookLogging: 1 637 | facebookStatus: 1 638 | facebookXfbml: 0 639 | facebookFrictionlessRequests: 1 640 | apiCompatibilityLevel: 6 641 | cloudProjectId: 67ad1ab4-fbd1-4256-bdf9-2b01c78a5f19 642 | framebufferDepthMemorylessMode: 0 643 | projectName: CastleVR 644 | organizationId: jack_ftw 645 | cloudEnabled: 0 646 | enableNativePlatformBackendsForNewInputSystem: 0 647 | disableOldInputManagerSupport: 0 648 | legacyClampBlendShapeWeights: 0 649 | -------------------------------------------------------------------------------- /Assets/_Prefabs/XR Rig.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &1758227417 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 1758227418} 12 | - component: {fileID: 1758227423} 13 | - component: {fileID: 1758227422} 14 | - component: {fileID: 1758227421} 15 | - component: {fileID: 1758227420} 16 | - component: {fileID: 1758227419} 17 | m_Layer: 9 18 | m_Name: GravityCapsuleCollider 19 | m_TagString: Untagged 20 | m_Icon: {fileID: 0} 21 | m_NavMeshLayer: 0 22 | m_StaticEditorFlags: 0 23 | m_IsActive: 1 24 | --- !u!4 &1758227418 25 | Transform: 26 | m_ObjectHideFlags: 0 27 | m_CorrespondingSourceObject: {fileID: 0} 28 | m_PrefabInstance: {fileID: 0} 29 | m_PrefabAsset: {fileID: 0} 30 | m_GameObject: {fileID: 1758227417} 31 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 32 | m_LocalPosition: {x: 0, y: 0, z: 0} 33 | m_LocalScale: {x: 1, y: 1, z: 1} 34 | m_Children: [] 35 | m_Father: {fileID: 1290026332584848116} 36 | m_RootOrder: 3 37 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 38 | --- !u!114 &1758227423 39 | MonoBehaviour: 40 | m_ObjectHideFlags: 0 41 | m_CorrespondingSourceObject: {fileID: 0} 42 | m_PrefabInstance: {fileID: 0} 43 | m_PrefabAsset: {fileID: 0} 44 | m_GameObject: {fileID: 1758227417} 45 | m_Enabled: 1 46 | m_EditorHideFlags: 0 47 | m_Script: {fileID: 11500000, guid: 5a2a9c34df4095f47b9ca8f975175f5b, type: 3} 48 | m_Name: 49 | m_EditorClassIdentifier: 50 | m_Device: 0 51 | m_PoseSource: 2 52 | m_PoseProviderComponent: {fileID: 1758227419} 53 | m_TrackingType: 2 54 | m_UpdateType: 0 55 | m_UseRelativeTransform: 0 56 | --- !u!136 &1758227422 57 | CapsuleCollider: 58 | m_ObjectHideFlags: 0 59 | m_CorrespondingSourceObject: {fileID: 0} 60 | m_PrefabInstance: {fileID: 0} 61 | m_PrefabAsset: {fileID: 0} 62 | m_GameObject: {fileID: 1758227417} 63 | m_Material: {fileID: 0} 64 | m_IsTrigger: 0 65 | m_Enabled: 1 66 | m_Radius: 0.1 67 | m_Height: 0.2 68 | m_Direction: 1 69 | m_Center: {x: 0, y: 0, z: 0} 70 | --- !u!136 &1758227421 71 | CapsuleCollider: 72 | m_ObjectHideFlags: 0 73 | m_CorrespondingSourceObject: {fileID: 0} 74 | m_PrefabInstance: {fileID: 0} 75 | m_PrefabAsset: {fileID: 0} 76 | m_GameObject: {fileID: 1758227417} 77 | m_Material: {fileID: 0} 78 | m_IsTrigger: 1 79 | m_Enabled: 1 80 | m_Radius: 0.1 81 | m_Height: 0.2 82 | m_Direction: 1 83 | m_Center: {x: 0, y: 0, z: 0} 84 | --- !u!114 &1758227420 85 | MonoBehaviour: 86 | m_ObjectHideFlags: 0 87 | m_CorrespondingSourceObject: {fileID: 0} 88 | m_PrefabInstance: {fileID: 0} 89 | m_PrefabAsset: {fileID: 0} 90 | m_GameObject: {fileID: 1758227417} 91 | m_Enabled: 1 92 | m_EditorHideFlags: 0 93 | m_Script: {fileID: 11500000, guid: 41627f87b43b0f444bd48010c2b362b4, type: 3} 94 | m_Name: 95 | m_EditorClassIdentifier: 96 | FloorOffset: {fileID: 1290026332584848116} 97 | --- !u!114 &1758227419 98 | MonoBehaviour: 99 | m_ObjectHideFlags: 0 100 | m_CorrespondingSourceObject: {fileID: 0} 101 | m_PrefabInstance: {fileID: 0} 102 | m_PrefabAsset: {fileID: 0} 103 | m_GameObject: {fileID: 1758227417} 104 | m_Enabled: 1 105 | m_EditorHideFlags: 0 106 | m_Script: {fileID: 11500000, guid: fbff8d9278898264aab5446721163821, type: 3} 107 | m_Name: 108 | m_EditorClassIdentifier: 109 | followDistance: 0.5 110 | --- !u!1 &1290026331129014830 111 | GameObject: 112 | m_ObjectHideFlags: 0 113 | m_CorrespondingSourceObject: {fileID: 0} 114 | m_PrefabInstance: {fileID: 0} 115 | m_PrefabAsset: {fileID: 0} 116 | serializedVersion: 6 117 | m_Component: 118 | - component: {fileID: 1290026331129014833} 119 | - component: {fileID: 1290026331129014832} 120 | - component: {fileID: 1290026331129014831} 121 | - component: {fileID: 1290026331129014834} 122 | - component: {fileID: 389515179} 123 | m_Layer: 9 124 | m_Name: Main Camera 125 | m_TagString: MainCamera 126 | m_Icon: {fileID: 0} 127 | m_NavMeshLayer: 0 128 | m_StaticEditorFlags: 0 129 | m_IsActive: 1 130 | --- !u!4 &1290026331129014833 131 | Transform: 132 | m_ObjectHideFlags: 0 133 | m_CorrespondingSourceObject: {fileID: 0} 134 | m_PrefabInstance: {fileID: 0} 135 | m_PrefabAsset: {fileID: 0} 136 | m_GameObject: {fileID: 1290026331129014830} 137 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 138 | m_LocalPosition: {x: 0, y: 0, z: 0} 139 | m_LocalScale: {x: 1, y: 1, z: 1} 140 | m_Children: [] 141 | m_Father: {fileID: 1290026332584848116} 142 | m_RootOrder: 0 143 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 144 | --- !u!20 &1290026331129014832 145 | Camera: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 1290026331129014830} 151 | m_Enabled: 1 152 | serializedVersion: 2 153 | m_ClearFlags: 1 154 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 155 | m_projectionMatrixMode: 1 156 | m_GateFitMode: 2 157 | m_FOVAxisMode: 0 158 | m_SensorSize: {x: 36, y: 24} 159 | m_LensShift: {x: 0, y: 0} 160 | m_FocalLength: 50 161 | m_NormalizedViewPortRect: 162 | serializedVersion: 2 163 | x: 0 164 | y: 0 165 | width: 1 166 | height: 1 167 | near clip plane: 0.01 168 | far clip plane: 1000 169 | field of view: 60 170 | orthographic: 0 171 | orthographic size: 5 172 | m_Depth: -1 173 | m_CullingMask: 174 | serializedVersion: 2 175 | m_Bits: 4294967295 176 | m_RenderingPath: -1 177 | m_TargetTexture: {fileID: 0} 178 | m_TargetDisplay: 0 179 | m_TargetEye: 3 180 | m_HDR: 1 181 | m_AllowMSAA: 1 182 | m_AllowDynamicResolution: 0 183 | m_ForceIntoRT: 0 184 | m_OcclusionCulling: 1 185 | m_StereoConvergence: 10 186 | m_StereoSeparation: 0.022 187 | --- !u!81 &1290026331129014831 188 | AudioListener: 189 | m_ObjectHideFlags: 0 190 | m_CorrespondingSourceObject: {fileID: 0} 191 | m_PrefabInstance: {fileID: 0} 192 | m_PrefabAsset: {fileID: 0} 193 | m_GameObject: {fileID: 1290026331129014830} 194 | m_Enabled: 1 195 | --- !u!114 &1290026331129014834 196 | MonoBehaviour: 197 | m_ObjectHideFlags: 0 198 | m_CorrespondingSourceObject: {fileID: 0} 199 | m_PrefabInstance: {fileID: 0} 200 | m_PrefabAsset: {fileID: 0} 201 | m_GameObject: {fileID: 1290026331129014830} 202 | m_Enabled: 1 203 | m_EditorHideFlags: 0 204 | m_Script: {fileID: 11500000, guid: 5a2a9c34df4095f47b9ca8f975175f5b, type: 3} 205 | m_Name: 206 | m_EditorClassIdentifier: 207 | m_Device: 0 208 | m_PoseSource: 2 209 | m_PoseProviderComponent: {fileID: 0} 210 | m_TrackingType: 0 211 | m_UpdateType: 0 212 | m_UseRelativeTransform: 0 213 | --- !u!135 &389515179 214 | SphereCollider: 215 | m_ObjectHideFlags: 0 216 | m_CorrespondingSourceObject: {fileID: 0} 217 | m_PrefabInstance: {fileID: 0} 218 | m_PrefabAsset: {fileID: 0} 219 | m_GameObject: {fileID: 1290026331129014830} 220 | m_Material: {fileID: 0} 221 | m_IsTrigger: 0 222 | m_Enabled: 1 223 | serializedVersion: 2 224 | m_Radius: 0.1 225 | m_Center: {x: 0, y: 0, z: 0} 226 | --- !u!1 &1290026331578079543 227 | GameObject: 228 | m_ObjectHideFlags: 0 229 | m_CorrespondingSourceObject: {fileID: 0} 230 | m_PrefabInstance: {fileID: 0} 231 | m_PrefabAsset: {fileID: 0} 232 | serializedVersion: 6 233 | m_Component: 234 | - component: {fileID: 1290026331578079544} 235 | - component: {fileID: 1290026331578079547} 236 | - component: {fileID: 1290026331578079546} 237 | - component: {fileID: 1290026331578079545} 238 | - component: {fileID: 410261351373211412} 239 | - component: {fileID: 7651836263140815226} 240 | m_Layer: 10 241 | m_Name: GrabCube 242 | m_TagString: Untagged 243 | m_Icon: {fileID: 0} 244 | m_NavMeshLayer: 0 245 | m_StaticEditorFlags: 0 246 | m_IsActive: 1 247 | --- !u!4 &1290026331578079544 248 | Transform: 249 | m_ObjectHideFlags: 0 250 | m_CorrespondingSourceObject: {fileID: 0} 251 | m_PrefabInstance: {fileID: 0} 252 | m_PrefabAsset: {fileID: 0} 253 | m_GameObject: {fileID: 1290026331578079543} 254 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 255 | m_LocalPosition: {x: 0, y: 0, z: 0} 256 | m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} 257 | m_Children: [] 258 | m_Father: {fileID: 1321791330314812457} 259 | m_RootOrder: 0 260 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 261 | --- !u!33 &1290026331578079547 262 | MeshFilter: 263 | m_ObjectHideFlags: 0 264 | m_CorrespondingSourceObject: {fileID: 0} 265 | m_PrefabInstance: {fileID: 0} 266 | m_PrefabAsset: {fileID: 0} 267 | m_GameObject: {fileID: 1290026331578079543} 268 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 269 | --- !u!23 &1290026331578079546 270 | MeshRenderer: 271 | m_ObjectHideFlags: 0 272 | m_CorrespondingSourceObject: {fileID: 0} 273 | m_PrefabInstance: {fileID: 0} 274 | m_PrefabAsset: {fileID: 0} 275 | m_GameObject: {fileID: 1290026331578079543} 276 | m_Enabled: 1 277 | m_CastShadows: 1 278 | m_ReceiveShadows: 1 279 | m_DynamicOccludee: 1 280 | m_MotionVectors: 1 281 | m_LightProbeUsage: 1 282 | m_ReflectionProbeUsage: 1 283 | m_RenderingLayerMask: 1 284 | m_RendererPriority: 0 285 | m_Materials: 286 | - {fileID: 2100000, guid: 8f7a878fc40ae2c42b5aff894759f62f, type: 2} 287 | m_StaticBatchInfo: 288 | firstSubMesh: 0 289 | subMeshCount: 0 290 | m_StaticBatchRoot: {fileID: 0} 291 | m_ProbeAnchor: {fileID: 0} 292 | m_LightProbeVolumeOverride: {fileID: 0} 293 | m_ScaleInLightmap: 1 294 | m_ReceiveGI: 1 295 | m_PreserveUVs: 0 296 | m_IgnoreNormalsForChartDetection: 0 297 | m_ImportantGI: 0 298 | m_StitchLightmapSeams: 0 299 | m_SelectedEditorRenderState: 3 300 | m_MinimumChartSize: 4 301 | m_AutoUVMaxDistance: 0.5 302 | m_AutoUVMaxAngle: 89 303 | m_LightmapParameters: {fileID: 0} 304 | m_SortingLayerID: 0 305 | m_SortingLayer: 0 306 | m_SortingOrder: 0 307 | --- !u!65 &1290026331578079545 308 | BoxCollider: 309 | m_ObjectHideFlags: 0 310 | m_CorrespondingSourceObject: {fileID: 0} 311 | m_PrefabInstance: {fileID: 0} 312 | m_PrefabAsset: {fileID: 0} 313 | m_GameObject: {fileID: 1290026331578079543} 314 | m_Material: {fileID: 0} 315 | m_IsTrigger: 1 316 | m_Enabled: 1 317 | serializedVersion: 2 318 | m_Size: {x: 1, y: 1, z: 1} 319 | m_Center: {x: 0, y: 0, z: 0} 320 | --- !u!114 &410261351373211412 321 | MonoBehaviour: 322 | m_ObjectHideFlags: 0 323 | m_CorrespondingSourceObject: {fileID: 0} 324 | m_PrefabInstance: {fileID: 0} 325 | m_PrefabAsset: {fileID: 0} 326 | m_GameObject: {fileID: 1290026331578079543} 327 | m_Enabled: 1 328 | m_EditorHideFlags: 0 329 | m_Script: {fileID: 11500000, guid: 2fb7cfb7e2bda5547ac80aab72fe4c96, type: 3} 330 | m_Name: 331 | m_EditorClassIdentifier: 332 | hand: 0 333 | xrRigRigidbody: {fileID: 1290026333011478314} 334 | climbScript: {fileID: 2374981738898686949} 335 | velocities: {fileID: 21088327} 336 | --- !u!54 &7651836263140815226 337 | Rigidbody: 338 | m_ObjectHideFlags: 0 339 | m_CorrespondingSourceObject: {fileID: 0} 340 | m_PrefabInstance: {fileID: 0} 341 | m_PrefabAsset: {fileID: 0} 342 | m_GameObject: {fileID: 1290026331578079543} 343 | serializedVersion: 2 344 | m_Mass: 1 345 | m_Drag: 0 346 | m_AngularDrag: 0.05 347 | m_UseGravity: 0 348 | m_IsKinematic: 1 349 | m_Interpolate: 0 350 | m_Constraints: 0 351 | m_CollisionDetection: 0 352 | --- !u!1 &1290026331896549563 353 | GameObject: 354 | m_ObjectHideFlags: 0 355 | m_CorrespondingSourceObject: {fileID: 0} 356 | m_PrefabInstance: {fileID: 0} 357 | m_PrefabAsset: {fileID: 0} 358 | serializedVersion: 6 359 | m_Component: 360 | - component: {fileID: 1290026331896549564} 361 | - component: {fileID: 1290026331896549565} 362 | - component: {fileID: 1781429295} 363 | m_Layer: 9 364 | m_Name: Right Hand 365 | m_TagString: Untagged 366 | m_Icon: {fileID: 0} 367 | m_NavMeshLayer: 0 368 | m_StaticEditorFlags: 0 369 | m_IsActive: 1 370 | --- !u!4 &1290026331896549564 371 | Transform: 372 | m_ObjectHideFlags: 0 373 | m_CorrespondingSourceObject: {fileID: 0} 374 | m_PrefabInstance: {fileID: 0} 375 | m_PrefabAsset: {fileID: 0} 376 | m_GameObject: {fileID: 1290026331896549563} 377 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 378 | m_LocalPosition: {x: 0, y: 0, z: 0} 379 | m_LocalScale: {x: 1, y: 1, z: 1} 380 | m_Children: 381 | - {fileID: 8753494000698280163} 382 | m_Father: {fileID: 1290026332584848116} 383 | m_RootOrder: 2 384 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 385 | --- !u!114 &1290026331896549565 386 | MonoBehaviour: 387 | m_ObjectHideFlags: 0 388 | m_CorrespondingSourceObject: {fileID: 0} 389 | m_PrefabInstance: {fileID: 0} 390 | m_PrefabAsset: {fileID: 0} 391 | m_GameObject: {fileID: 1290026331896549563} 392 | m_Enabled: 1 393 | m_EditorHideFlags: 0 394 | m_Script: {fileID: 11500000, guid: 5a2a9c34df4095f47b9ca8f975175f5b, type: 3} 395 | m_Name: 396 | m_EditorClassIdentifier: 397 | m_Device: 1 398 | m_PoseSource: 5 399 | m_PoseProviderComponent: {fileID: 0} 400 | m_TrackingType: 0 401 | m_UpdateType: 0 402 | m_UseRelativeTransform: 0 403 | --- !u!114 &1781429295 404 | MonoBehaviour: 405 | m_ObjectHideFlags: 0 406 | m_CorrespondingSourceObject: {fileID: 0} 407 | m_PrefabInstance: {fileID: 0} 408 | m_PrefabAsset: {fileID: 0} 409 | m_GameObject: {fileID: 1290026331896549563} 410 | m_Enabled: 1 411 | m_EditorHideFlags: 0 412 | m_Script: {fileID: 11500000, guid: 153bf3ff3d6a67f4ea339fb734df0e9a, type: 3} 413 | m_Name: 414 | m_EditorClassIdentifier: 415 | --- !u!1 &1290026332290408759 416 | GameObject: 417 | m_ObjectHideFlags: 0 418 | m_CorrespondingSourceObject: {fileID: 0} 419 | m_PrefabInstance: {fileID: 0} 420 | m_PrefabAsset: {fileID: 0} 421 | serializedVersion: 6 422 | m_Component: 423 | - component: {fileID: 1290026332290408760} 424 | - component: {fileID: 1290026332290408761} 425 | - component: {fileID: 21088327} 426 | m_Layer: 9 427 | m_Name: Left Hand 428 | m_TagString: Untagged 429 | m_Icon: {fileID: 0} 430 | m_NavMeshLayer: 0 431 | m_StaticEditorFlags: 0 432 | m_IsActive: 1 433 | --- !u!4 &1290026332290408760 434 | Transform: 435 | m_ObjectHideFlags: 0 436 | m_CorrespondingSourceObject: {fileID: 0} 437 | m_PrefabInstance: {fileID: 0} 438 | m_PrefabAsset: {fileID: 0} 439 | m_GameObject: {fileID: 1290026332290408759} 440 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 441 | m_LocalPosition: {x: 0, y: 0, z: 0} 442 | m_LocalScale: {x: 1, y: 1, z: 1} 443 | m_Children: 444 | - {fileID: 1321791330314812457} 445 | m_Father: {fileID: 1290026332584848116} 446 | m_RootOrder: 1 447 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 448 | --- !u!114 &1290026332290408761 449 | MonoBehaviour: 450 | m_ObjectHideFlags: 0 451 | m_CorrespondingSourceObject: {fileID: 0} 452 | m_PrefabInstance: {fileID: 0} 453 | m_PrefabAsset: {fileID: 0} 454 | m_GameObject: {fileID: 1290026332290408759} 455 | m_Enabled: 1 456 | m_EditorHideFlags: 0 457 | m_Script: {fileID: 11500000, guid: 5a2a9c34df4095f47b9ca8f975175f5b, type: 3} 458 | m_Name: 459 | m_EditorClassIdentifier: 460 | m_Device: 1 461 | m_PoseSource: 4 462 | m_PoseProviderComponent: {fileID: 0} 463 | m_TrackingType: 0 464 | m_UpdateType: 0 465 | m_UseRelativeTransform: 0 466 | --- !u!114 &21088327 467 | MonoBehaviour: 468 | m_ObjectHideFlags: 0 469 | m_CorrespondingSourceObject: {fileID: 0} 470 | m_PrefabInstance: {fileID: 0} 471 | m_PrefabAsset: {fileID: 0} 472 | m_GameObject: {fileID: 1290026332290408759} 473 | m_Enabled: 1 474 | m_EditorHideFlags: 0 475 | m_Script: {fileID: 11500000, guid: 153bf3ff3d6a67f4ea339fb734df0e9a, type: 3} 476 | m_Name: 477 | m_EditorClassIdentifier: 478 | --- !u!1 &1290026332584848115 479 | GameObject: 480 | m_ObjectHideFlags: 0 481 | m_CorrespondingSourceObject: {fileID: 0} 482 | m_PrefabInstance: {fileID: 0} 483 | m_PrefabAsset: {fileID: 0} 484 | serializedVersion: 6 485 | m_Component: 486 | - component: {fileID: 1290026332584848116} 487 | - component: {fileID: 148329915} 488 | m_Layer: 9 489 | m_Name: FloorOffset 490 | m_TagString: Untagged 491 | m_Icon: {fileID: 0} 492 | m_NavMeshLayer: 0 493 | m_StaticEditorFlags: 0 494 | m_IsActive: 1 495 | --- !u!4 &1290026332584848116 496 | Transform: 497 | m_ObjectHideFlags: 0 498 | m_CorrespondingSourceObject: {fileID: 0} 499 | m_PrefabInstance: {fileID: 0} 500 | m_PrefabAsset: {fileID: 0} 501 | m_GameObject: {fileID: 1290026332584848115} 502 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 503 | m_LocalPosition: {x: 0, y: 0, z: 0} 504 | m_LocalScale: {x: 1, y: 1, z: 1} 505 | m_Children: 506 | - {fileID: 1290026331129014833} 507 | - {fileID: 1290026332290408760} 508 | - {fileID: 1290026331896549564} 509 | - {fileID: 1758227418} 510 | m_Father: {fileID: 1290026333011478313} 511 | m_RootOrder: 0 512 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 513 | --- !u!114 &148329915 514 | MonoBehaviour: 515 | m_ObjectHideFlags: 0 516 | m_CorrespondingSourceObject: {fileID: 0} 517 | m_PrefabInstance: {fileID: 0} 518 | m_PrefabAsset: {fileID: 0} 519 | m_GameObject: {fileID: 1290026332584848115} 520 | m_Enabled: 1 521 | m_EditorHideFlags: 0 522 | m_Script: {fileID: 11500000, guid: e9ef885f046ae574691806f5b2ca0352, type: 3} 523 | m_Name: 524 | m_EditorClassIdentifier: 525 | OffsetHeight: 1.69 526 | --- !u!1 &1290026332810618477 527 | GameObject: 528 | m_ObjectHideFlags: 0 529 | m_CorrespondingSourceObject: {fileID: 0} 530 | m_PrefabInstance: {fileID: 0} 531 | m_PrefabAsset: {fileID: 0} 532 | serializedVersion: 6 533 | m_Component: 534 | - component: {fileID: 1290026332810618478} 535 | - component: {fileID: 1290026332810618481} 536 | - component: {fileID: 1290026332810618480} 537 | - component: {fileID: 1290026332810618479} 538 | - component: {fileID: 3834899723689834495} 539 | - component: {fileID: 7821122215498839622} 540 | m_Layer: 10 541 | m_Name: GrabCube 542 | m_TagString: Untagged 543 | m_Icon: {fileID: 0} 544 | m_NavMeshLayer: 0 545 | m_StaticEditorFlags: 0 546 | m_IsActive: 1 547 | --- !u!4 &1290026332810618478 548 | Transform: 549 | m_ObjectHideFlags: 0 550 | m_CorrespondingSourceObject: {fileID: 0} 551 | m_PrefabInstance: {fileID: 0} 552 | m_PrefabAsset: {fileID: 0} 553 | m_GameObject: {fileID: 1290026332810618477} 554 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 555 | m_LocalPosition: {x: 0, y: 0, z: 0} 556 | m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} 557 | m_Children: [] 558 | m_Father: {fileID: 8753494000698280163} 559 | m_RootOrder: 0 560 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 561 | --- !u!33 &1290026332810618481 562 | MeshFilter: 563 | m_ObjectHideFlags: 0 564 | m_CorrespondingSourceObject: {fileID: 0} 565 | m_PrefabInstance: {fileID: 0} 566 | m_PrefabAsset: {fileID: 0} 567 | m_GameObject: {fileID: 1290026332810618477} 568 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 569 | --- !u!23 &1290026332810618480 570 | MeshRenderer: 571 | m_ObjectHideFlags: 0 572 | m_CorrespondingSourceObject: {fileID: 0} 573 | m_PrefabInstance: {fileID: 0} 574 | m_PrefabAsset: {fileID: 0} 575 | m_GameObject: {fileID: 1290026332810618477} 576 | m_Enabled: 1 577 | m_CastShadows: 1 578 | m_ReceiveShadows: 1 579 | m_DynamicOccludee: 1 580 | m_MotionVectors: 1 581 | m_LightProbeUsage: 1 582 | m_ReflectionProbeUsage: 1 583 | m_RenderingLayerMask: 1 584 | m_RendererPriority: 0 585 | m_Materials: 586 | - {fileID: 2100000, guid: d4fe47b89599ce143ab81cdc826a2110, type: 2} 587 | m_StaticBatchInfo: 588 | firstSubMesh: 0 589 | subMeshCount: 0 590 | m_StaticBatchRoot: {fileID: 0} 591 | m_ProbeAnchor: {fileID: 0} 592 | m_LightProbeVolumeOverride: {fileID: 0} 593 | m_ScaleInLightmap: 1 594 | m_ReceiveGI: 1 595 | m_PreserveUVs: 0 596 | m_IgnoreNormalsForChartDetection: 0 597 | m_ImportantGI: 0 598 | m_StitchLightmapSeams: 0 599 | m_SelectedEditorRenderState: 3 600 | m_MinimumChartSize: 4 601 | m_AutoUVMaxDistance: 0.5 602 | m_AutoUVMaxAngle: 89 603 | m_LightmapParameters: {fileID: 0} 604 | m_SortingLayerID: 0 605 | m_SortingLayer: 0 606 | m_SortingOrder: 0 607 | --- !u!65 &1290026332810618479 608 | BoxCollider: 609 | m_ObjectHideFlags: 0 610 | m_CorrespondingSourceObject: {fileID: 0} 611 | m_PrefabInstance: {fileID: 0} 612 | m_PrefabAsset: {fileID: 0} 613 | m_GameObject: {fileID: 1290026332810618477} 614 | m_Material: {fileID: 0} 615 | m_IsTrigger: 1 616 | m_Enabled: 1 617 | serializedVersion: 2 618 | m_Size: {x: 1, y: 1, z: 1} 619 | m_Center: {x: 0, y: 0, z: 0} 620 | --- !u!114 &3834899723689834495 621 | MonoBehaviour: 622 | m_ObjectHideFlags: 0 623 | m_CorrespondingSourceObject: {fileID: 0} 624 | m_PrefabInstance: {fileID: 0} 625 | m_PrefabAsset: {fileID: 0} 626 | m_GameObject: {fileID: 1290026332810618477} 627 | m_Enabled: 1 628 | m_EditorHideFlags: 0 629 | m_Script: {fileID: 11500000, guid: 2fb7cfb7e2bda5547ac80aab72fe4c96, type: 3} 630 | m_Name: 631 | m_EditorClassIdentifier: 632 | hand: 1 633 | xrRigRigidbody: {fileID: 1290026333011478314} 634 | climbScript: {fileID: 2374981738898686949} 635 | velocities: {fileID: 1781429295} 636 | --- !u!54 &7821122215498839622 637 | Rigidbody: 638 | m_ObjectHideFlags: 0 639 | m_CorrespondingSourceObject: {fileID: 0} 640 | m_PrefabInstance: {fileID: 0} 641 | m_PrefabAsset: {fileID: 0} 642 | m_GameObject: {fileID: 1290026332810618477} 643 | serializedVersion: 2 644 | m_Mass: 1 645 | m_Drag: 0 646 | m_AngularDrag: 0.05 647 | m_UseGravity: 0 648 | m_IsKinematic: 1 649 | m_Interpolate: 0 650 | m_Constraints: 0 651 | m_CollisionDetection: 0 652 | --- !u!1 &1290026333011478312 653 | GameObject: 654 | m_ObjectHideFlags: 0 655 | m_CorrespondingSourceObject: {fileID: 0} 656 | m_PrefabInstance: {fileID: 0} 657 | m_PrefabAsset: {fileID: 0} 658 | serializedVersion: 6 659 | m_Component: 660 | - component: {fileID: 1290026333011478313} 661 | - component: {fileID: 1290026333011478314} 662 | - component: {fileID: 3361179147464165731} 663 | - component: {fileID: 688659872842568178} 664 | - component: {fileID: 1290026333011478315} 665 | - component: {fileID: 2374981738898686949} 666 | - component: {fileID: 208879919} 667 | - component: {fileID: 208879921} 668 | m_Layer: 9 669 | m_Name: XR Rig 670 | m_TagString: Untagged 671 | m_Icon: {fileID: 0} 672 | m_NavMeshLayer: 0 673 | m_StaticEditorFlags: 0 674 | m_IsActive: 1 675 | --- !u!4 &1290026333011478313 676 | Transform: 677 | m_ObjectHideFlags: 0 678 | m_CorrespondingSourceObject: {fileID: 0} 679 | m_PrefabInstance: {fileID: 0} 680 | m_PrefabAsset: {fileID: 0} 681 | m_GameObject: {fileID: 1290026333011478312} 682 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 683 | m_LocalPosition: {x: 0, y: 0, z: 0} 684 | m_LocalScale: {x: 1, y: 1, z: 1} 685 | m_Children: 686 | - {fileID: 1290026332584848116} 687 | m_Father: {fileID: 0} 688 | m_RootOrder: 0 689 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 690 | --- !u!54 &1290026333011478314 691 | Rigidbody: 692 | m_ObjectHideFlags: 0 693 | m_CorrespondingSourceObject: {fileID: 0} 694 | m_PrefabInstance: {fileID: 0} 695 | m_PrefabAsset: {fileID: 0} 696 | m_GameObject: {fileID: 1290026333011478312} 697 | serializedVersion: 2 698 | m_Mass: 1 699 | m_Drag: 0 700 | m_AngularDrag: 0.05 701 | m_UseGravity: 1 702 | m_IsKinematic: 0 703 | m_Interpolate: 0 704 | m_Constraints: 112 705 | m_CollisionDetection: 2 706 | --- !u!114 &3361179147464165731 707 | MonoBehaviour: 708 | m_ObjectHideFlags: 0 709 | m_CorrespondingSourceObject: {fileID: 0} 710 | m_PrefabInstance: {fileID: 0} 711 | m_PrefabAsset: {fileID: 0} 712 | m_GameObject: {fileID: 1290026333011478312} 713 | m_Enabled: 1 714 | m_EditorHideFlags: 0 715 | m_Script: {fileID: 11500000, guid: 10d6472ec4d0769449e4e7e5a7732c91, type: 3} 716 | m_Name: 717 | m_EditorClassIdentifier: 718 | --- !u!114 &688659872842568178 719 | MonoBehaviour: 720 | m_ObjectHideFlags: 0 721 | m_CorrespondingSourceObject: {fileID: 0} 722 | m_PrefabInstance: {fileID: 0} 723 | m_PrefabAsset: {fileID: 0} 724 | m_GameObject: {fileID: 1290026333011478312} 725 | m_Enabled: 1 726 | m_EditorHideFlags: 0 727 | m_Script: {fileID: 11500000, guid: da0381657c80877418a54d2e0dd41b16, type: 3} 728 | m_Name: 729 | m_EditorClassIdentifier: 730 | --- !u!114 &1290026333011478315 731 | MonoBehaviour: 732 | m_ObjectHideFlags: 0 733 | m_CorrespondingSourceObject: {fileID: 0} 734 | m_PrefabInstance: {fileID: 0} 735 | m_PrefabAsset: {fileID: 0} 736 | m_GameObject: {fileID: 1290026333011478312} 737 | m_Enabled: 1 738 | m_EditorHideFlags: 0 739 | m_Script: {fileID: 11500000, guid: 45c745c5054094f4599abc3859047823, type: 3} 740 | m_Name: 741 | m_EditorClassIdentifier: 742 | --- !u!114 &2374981738898686949 743 | MonoBehaviour: 744 | m_ObjectHideFlags: 0 745 | m_CorrespondingSourceObject: {fileID: 0} 746 | m_PrefabInstance: {fileID: 0} 747 | m_PrefabAsset: {fileID: 0} 748 | m_GameObject: {fileID: 1290026333011478312} 749 | m_Enabled: 1 750 | m_EditorHideFlags: 0 751 | m_Script: {fileID: 11500000, guid: b7fcb377442d2174c9006d8c48f27b5e, type: 3} 752 | m_Name: 753 | m_EditorClassIdentifier: 754 | GravityColliderScript: {fileID: 1758227420} 755 | --- !u!114 &208879919 756 | MonoBehaviour: 757 | m_ObjectHideFlags: 0 758 | m_CorrespondingSourceObject: {fileID: 0} 759 | m_PrefabInstance: {fileID: 0} 760 | m_PrefabAsset: {fileID: 0} 761 | m_GameObject: {fileID: 1290026333011478312} 762 | m_Enabled: 1 763 | m_EditorHideFlags: 0 764 | m_Script: {fileID: 11500000, guid: 995d7d9dfe496fc498491694fb8b5dde, type: 3} 765 | m_Name: 766 | m_EditorClassIdentifier: 767 | moveSpeed: 2 768 | --- !u!114 &208879921 769 | MonoBehaviour: 770 | m_ObjectHideFlags: 0 771 | m_CorrespondingSourceObject: {fileID: 0} 772 | m_PrefabInstance: {fileID: 0} 773 | m_PrefabAsset: {fileID: 0} 774 | m_GameObject: {fileID: 1290026333011478312} 775 | m_Enabled: 1 776 | m_EditorHideFlags: 0 777 | m_Script: {fileID: 11500000, guid: 97b2fc63250f3aa4a9dc1f94061733fa, type: 3} 778 | m_Name: 779 | m_EditorClassIdentifier: 780 | head: {fileID: 1290026331129014830} 781 | leftHand: {fileID: 1290026332290408759} 782 | rightHand: {fileID: 1290026331896549563} 783 | --- !u!1 &1618805724313074927 784 | GameObject: 785 | m_ObjectHideFlags: 0 786 | m_CorrespondingSourceObject: {fileID: 0} 787 | m_PrefabInstance: {fileID: 0} 788 | m_PrefabAsset: {fileID: 0} 789 | serializedVersion: 6 790 | m_Component: 791 | - component: {fileID: 8753494000698280163} 792 | - component: {fileID: 7913839907166182501} 793 | m_Layer: 9 794 | m_Name: InteractorOffset 795 | m_TagString: Untagged 796 | m_Icon: {fileID: 0} 797 | m_NavMeshLayer: 0 798 | m_StaticEditorFlags: 0 799 | m_IsActive: 1 800 | --- !u!4 &8753494000698280163 801 | Transform: 802 | m_ObjectHideFlags: 0 803 | m_CorrespondingSourceObject: {fileID: 0} 804 | m_PrefabInstance: {fileID: 0} 805 | m_PrefabAsset: {fileID: 0} 806 | m_GameObject: {fileID: 1618805724313074927} 807 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 808 | m_LocalPosition: {x: 0, y: 0, z: 0} 809 | m_LocalScale: {x: 1, y: 1, z: 1} 810 | m_Children: 811 | - {fileID: 1290026332810618478} 812 | m_Father: {fileID: 1290026331896549564} 813 | m_RootOrder: 0 814 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 815 | --- !u!114 &7913839907166182501 816 | MonoBehaviour: 817 | m_ObjectHideFlags: 0 818 | m_CorrespondingSourceObject: {fileID: 0} 819 | m_PrefabInstance: {fileID: 0} 820 | m_PrefabAsset: {fileID: 0} 821 | m_GameObject: {fileID: 1618805724313074927} 822 | m_Enabled: 1 823 | m_EditorHideFlags: 0 824 | m_Script: {fileID: 11500000, guid: 402375ff00bc2e5439910e53b7715de3, type: 3} 825 | m_Name: 826 | m_EditorClassIdentifier: 827 | --- !u!1 &9015170145644288473 828 | GameObject: 829 | m_ObjectHideFlags: 0 830 | m_CorrespondingSourceObject: {fileID: 0} 831 | m_PrefabInstance: {fileID: 0} 832 | m_PrefabAsset: {fileID: 0} 833 | serializedVersion: 6 834 | m_Component: 835 | - component: {fileID: 1321791330314812457} 836 | - component: {fileID: 4177646724391782090} 837 | m_Layer: 9 838 | m_Name: InteractorOffset 839 | m_TagString: Untagged 840 | m_Icon: {fileID: 0} 841 | m_NavMeshLayer: 0 842 | m_StaticEditorFlags: 0 843 | m_IsActive: 1 844 | --- !u!4 &1321791330314812457 845 | Transform: 846 | m_ObjectHideFlags: 0 847 | m_CorrespondingSourceObject: {fileID: 0} 848 | m_PrefabInstance: {fileID: 0} 849 | m_PrefabAsset: {fileID: 0} 850 | m_GameObject: {fileID: 9015170145644288473} 851 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 852 | m_LocalPosition: {x: 0, y: 0, z: 0} 853 | m_LocalScale: {x: 1, y: 1, z: 1} 854 | m_Children: 855 | - {fileID: 1290026331578079544} 856 | m_Father: {fileID: 1290026332290408760} 857 | m_RootOrder: 0 858 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 859 | --- !u!114 &4177646724391782090 860 | MonoBehaviour: 861 | m_ObjectHideFlags: 0 862 | m_CorrespondingSourceObject: {fileID: 0} 863 | m_PrefabInstance: {fileID: 0} 864 | m_PrefabAsset: {fileID: 0} 865 | m_GameObject: {fileID: 9015170145644288473} 866 | m_Enabled: 1 867 | m_EditorHideFlags: 0 868 | m_Script: {fileID: 11500000, guid: 402375ff00bc2e5439910e53b7715de3, type: 3} 869 | m_Name: 870 | m_EditorClassIdentifier: 871 | --------------------------------------------------------------------------------