├── .gitattributes ├── .gitignore ├── Assets ├── Prefabs.meta ├── Prefabs │ ├── AltitudeLine.prefab │ ├── AltitudeLine.prefab.meta │ ├── Ball.prefab │ ├── Ball.prefab.meta │ ├── Motor.prefab │ └── Motor.prefab.meta ├── Scenes.meta ├── Scenes │ ├── Altitude Control.meta │ ├── Altitude Control │ │ ├── Altitude Control.unity │ │ ├── Altitude Control.unity.meta │ │ ├── AltitudeController.cs │ │ ├── AltitudeController.cs.meta │ │ ├── AltitudeLines.cs │ │ ├── AltitudeLines.cs.meta │ │ ├── AltitudeUI.cs │ │ ├── AltitudeUI.cs.meta │ │ ├── CameraFollow.cs │ │ └── CameraFollow.cs.meta │ ├── Balance Rod.meta │ ├── Balance Rod │ │ ├── Balance Rod.unity │ │ ├── Balance Rod.unity.meta │ │ ├── BalanceController.cs │ │ ├── BalanceController.cs.meta │ │ ├── BalanceUI.cs │ │ └── BalanceUI.cs.meta │ ├── Main Menu.meta │ └── Main Menu │ │ ├── Main Menu.unity │ │ ├── Main Menu.unity.meta │ │ ├── SceneController.cs │ │ ├── SceneController.cs.meta │ │ ├── TextStyle.cs │ │ └── TextStyle.cs.meta ├── Scripts.meta ├── Scripts │ ├── Ball.cs │ ├── Ball.cs.meta │ ├── BallManager.cs │ ├── BallManager.cs.meta │ ├── Motor.cs │ ├── Motor.cs.meta │ ├── PID.cs │ └── PID.cs.meta ├── Sprites.meta └── Sprites │ ├── Circle.png │ ├── Circle.png.meta │ ├── Rectangle.png │ ├── Rectangle.png.meta │ ├── Triangle.png │ └── Triangle.png.meta ├── LICENSE.md ├── Packages ├── manifest.json └── packages-lock.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── PackageManagerSettings.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset ├── VersionControlSettings.asset └── XRSettings.asset ├── README.md └── UserSettings └── EditorUserSettings.asset /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Mm]emoryCaptures/ 12 | 13 | # Asset meta data should only be ignored when the corresponding asset is also ignored 14 | !/[Aa]ssets/**/*.meta 15 | 16 | # Uncomment this line if you wish to ignore the asset store tools plugin 17 | # /[Aa]ssets/AssetStoreTools* 18 | 19 | # Autogenerated Jetbrains Rider plugin 20 | [Aa]ssets/Plugins/Editor/JetBrains* 21 | 22 | # Visual Studio cache directory 23 | .vs/ 24 | .vscode/ 25 | 26 | # Gradle cache directory 27 | .gradle/ 28 | 29 | # Autogenerated VS/MD/Consulo solution and project files 30 | ExportedObj/ 31 | .consulo/ 32 | *.csproj 33 | *.unityproj 34 | *.sln 35 | *.suo 36 | *.tmp 37 | *.user 38 | *.userprefs 39 | *.pidb 40 | *.booproj 41 | *.svd 42 | *.pdb 43 | *.mdb 44 | *.opendb 45 | *.VC.db 46 | 47 | # Unity3D generated meta files 48 | *.pidb.meta 49 | *.pdb.meta 50 | *.mdb.meta 51 | 52 | # Unity3D generated file on crash reports 53 | sysinfo.txt 54 | 55 | # Builds 56 | *.apk 57 | *.unitypackage 58 | 59 | # Crashlytics generated file 60 | crashlytics-build.properties 61 | 62 | -------------------------------------------------------------------------------- /Assets/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8bd50933aee1d1d4ca2a507162165a44 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/AltitudeLine.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &2226321357389862942 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: 2226321357389862943} 12 | - component: {fileID: 2226321357389862937} 13 | - component: {fileID: 2226321357389862936} 14 | m_Layer: 5 15 | m_Name: Altitude 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!224 &2226321357389862943 22 | RectTransform: 23 | m_ObjectHideFlags: 0 24 | m_CorrespondingSourceObject: {fileID: 0} 25 | m_PrefabInstance: {fileID: 0} 26 | m_PrefabAsset: {fileID: 0} 27 | m_GameObject: {fileID: 2226321357389862942} 28 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 29 | m_LocalPosition: {x: 0, y: 0, z: 0} 30 | m_LocalScale: {x: 0.00054635375, y: 0.32, z: 0.011473429} 31 | m_Children: [] 32 | m_Father: {fileID: 2226321358943047210} 33 | m_RootOrder: 0 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | m_AnchorMin: {x: 0.5, y: 0.5} 36 | m_AnchorMax: {x: 0.5, y: 0.5} 37 | m_AnchoredPosition: {x: -0.4412, y: 8.36} 38 | m_SizeDelta: {x: 190.0086, y: 48.84} 39 | m_Pivot: {x: 0.5, y: 0.5} 40 | --- !u!222 &2226321357389862937 41 | CanvasRenderer: 42 | m_ObjectHideFlags: 0 43 | m_CorrespondingSourceObject: {fileID: 0} 44 | m_PrefabInstance: {fileID: 0} 45 | m_PrefabAsset: {fileID: 0} 46 | m_GameObject: {fileID: 2226321357389862942} 47 | m_CullTransparentMesh: 0 48 | --- !u!114 &2226321357389862936 49 | MonoBehaviour: 50 | m_ObjectHideFlags: 0 51 | m_CorrespondingSourceObject: {fileID: 0} 52 | m_PrefabInstance: {fileID: 0} 53 | m_PrefabAsset: {fileID: 0} 54 | m_GameObject: {fileID: 2226321357389862942} 55 | m_Enabled: 1 56 | m_EditorHideFlags: 0 57 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 58 | m_Name: 59 | m_EditorClassIdentifier: 60 | m_Material: {fileID: 0} 61 | m_Color: {r: 0.54901963, g: 0.54901963, b: 0.54901963, a: 1} 62 | m_RaycastTarget: 1 63 | m_OnCullStateChanged: 64 | m_PersistentCalls: 65 | m_Calls: [] 66 | m_FontData: 67 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 68 | m_FontSize: 40 69 | m_FontStyle: 0 70 | m_BestFit: 0 71 | m_MinSize: 10 72 | m_MaxSize: 70 73 | m_Alignment: 3 74 | m_AlignByGeometry: 0 75 | m_RichText: 1 76 | m_HorizontalOverflow: 0 77 | m_VerticalOverflow: 0 78 | m_LineSpacing: 1 79 | m_Text: 100 m 80 | --- !u!1 &2226321358943047209 81 | GameObject: 82 | m_ObjectHideFlags: 0 83 | m_CorrespondingSourceObject: {fileID: 0} 84 | m_PrefabInstance: {fileID: 0} 85 | m_PrefabAsset: {fileID: 0} 86 | serializedVersion: 6 87 | m_Component: 88 | - component: {fileID: 2226321358943047210} 89 | - component: {fileID: 2226321358943047211} 90 | m_Layer: 0 91 | m_Name: AltitudeLine 92 | m_TagString: Untagged 93 | m_Icon: {fileID: 0} 94 | m_NavMeshLayer: 0 95 | m_StaticEditorFlags: 0 96 | m_IsActive: 1 97 | --- !u!4 &2226321358943047210 98 | Transform: 99 | m_ObjectHideFlags: 0 100 | m_CorrespondingSourceObject: {fileID: 0} 101 | m_PrefabInstance: {fileID: 0} 102 | m_PrefabAsset: {fileID: 0} 103 | m_GameObject: {fileID: 2226321358943047209} 104 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 105 | m_LocalPosition: {x: 0, y: 0, z: 0} 106 | m_LocalScale: {x: 17, y: 0.030000003, z: 0} 107 | m_Children: 108 | - {fileID: 2226321357389862943} 109 | m_Father: {fileID: 0} 110 | m_RootOrder: 0 111 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 112 | --- !u!212 &2226321358943047211 113 | SpriteRenderer: 114 | m_ObjectHideFlags: 0 115 | m_CorrespondingSourceObject: {fileID: 0} 116 | m_PrefabInstance: {fileID: 0} 117 | m_PrefabAsset: {fileID: 0} 118 | m_GameObject: {fileID: 2226321358943047209} 119 | m_Enabled: 1 120 | m_CastShadows: 0 121 | m_ReceiveShadows: 0 122 | m_DynamicOccludee: 1 123 | m_MotionVectors: 1 124 | m_LightProbeUsage: 1 125 | m_ReflectionProbeUsage: 1 126 | m_RayTracingMode: 0 127 | m_RenderingLayerMask: 1 128 | m_RendererPriority: 0 129 | m_Materials: 130 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 131 | m_StaticBatchInfo: 132 | firstSubMesh: 0 133 | subMeshCount: 0 134 | m_StaticBatchRoot: {fileID: 0} 135 | m_ProbeAnchor: {fileID: 0} 136 | m_LightProbeVolumeOverride: {fileID: 0} 137 | m_ScaleInLightmap: 1 138 | m_ReceiveGI: 1 139 | m_PreserveUVs: 0 140 | m_IgnoreNormalsForChartDetection: 0 141 | m_ImportantGI: 0 142 | m_StitchLightmapSeams: 1 143 | m_SelectedEditorRenderState: 0 144 | m_MinimumChartSize: 4 145 | m_AutoUVMaxDistance: 0.5 146 | m_AutoUVMaxAngle: 89 147 | m_LightmapParameters: {fileID: 0} 148 | m_SortingLayerID: 0 149 | m_SortingLayer: 0 150 | m_SortingOrder: 0 151 | m_Sprite: {fileID: 21300000, guid: 692f4be363ac5b64195cdab4e433d302, type: 3} 152 | m_Color: {r: 0.54901963, g: 0.54901963, b: 0.54901963, a: 1} 153 | m_FlipX: 0 154 | m_FlipY: 0 155 | m_DrawMode: 0 156 | m_Size: {x: 1, y: 1} 157 | m_AdaptiveModeThreshold: 0.5 158 | m_SpriteTileMode: 0 159 | m_WasSpriteAssigned: 1 160 | m_MaskInteraction: 0 161 | m_SpriteSortPoint: 0 162 | -------------------------------------------------------------------------------- /Assets/Prefabs/AltitudeLine.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: abfb4f41be7a4b5498241771715f8b8e 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Ball.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &8030361172146264872 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: 3017639805311060176} 12 | - component: {fileID: 5521687773149183009} 13 | - component: {fileID: 7536967702774863482} 14 | - component: {fileID: 2655290458430116244} 15 | - component: {fileID: 2290323400442831729} 16 | m_Layer: 0 17 | m_Name: Ball 18 | m_TagString: Untagged 19 | m_Icon: {fileID: 0} 20 | m_NavMeshLayer: 0 21 | m_StaticEditorFlags: 0 22 | m_IsActive: 1 23 | --- !u!4 &3017639805311060176 24 | Transform: 25 | m_ObjectHideFlags: 0 26 | m_CorrespondingSourceObject: {fileID: 0} 27 | m_PrefabInstance: {fileID: 0} 28 | m_PrefabAsset: {fileID: 0} 29 | m_GameObject: {fileID: 8030361172146264872} 30 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 31 | m_LocalPosition: {x: -3.29, y: 2.34, z: 0} 32 | m_LocalScale: {x: 1, y: 1, z: 1} 33 | m_Children: [] 34 | m_Father: {fileID: 0} 35 | m_RootOrder: 0 36 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 37 | --- !u!212 &5521687773149183009 38 | SpriteRenderer: 39 | m_ObjectHideFlags: 0 40 | m_CorrespondingSourceObject: {fileID: 0} 41 | m_PrefabInstance: {fileID: 0} 42 | m_PrefabAsset: {fileID: 0} 43 | m_GameObject: {fileID: 8030361172146264872} 44 | m_Enabled: 1 45 | m_CastShadows: 0 46 | m_ReceiveShadows: 0 47 | m_DynamicOccludee: 1 48 | m_MotionVectors: 1 49 | m_LightProbeUsage: 1 50 | m_ReflectionProbeUsage: 1 51 | m_RayTracingMode: 0 52 | m_RenderingLayerMask: 1 53 | m_RendererPriority: 0 54 | m_Materials: 55 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 56 | m_StaticBatchInfo: 57 | firstSubMesh: 0 58 | subMeshCount: 0 59 | m_StaticBatchRoot: {fileID: 0} 60 | m_ProbeAnchor: {fileID: 0} 61 | m_LightProbeVolumeOverride: {fileID: 0} 62 | m_ScaleInLightmap: 1 63 | m_ReceiveGI: 1 64 | m_PreserveUVs: 0 65 | m_IgnoreNormalsForChartDetection: 0 66 | m_ImportantGI: 0 67 | m_StitchLightmapSeams: 1 68 | m_SelectedEditorRenderState: 0 69 | m_MinimumChartSize: 4 70 | m_AutoUVMaxDistance: 0.5 71 | m_AutoUVMaxAngle: 89 72 | m_LightmapParameters: {fileID: 0} 73 | m_SortingLayerID: 0 74 | m_SortingLayer: 0 75 | m_SortingOrder: 5 76 | m_Sprite: {fileID: 21300000, guid: d41745d1b38edad47b22ea7dae227e87, type: 3} 77 | m_Color: {r: 1, g: 1, b: 1, a: 1} 78 | m_FlipX: 0 79 | m_FlipY: 0 80 | m_DrawMode: 0 81 | m_Size: {x: 1, y: 1} 82 | m_AdaptiveModeThreshold: 0.5 83 | m_SpriteTileMode: 0 84 | m_WasSpriteAssigned: 1 85 | m_MaskInteraction: 0 86 | m_SpriteSortPoint: 0 87 | --- !u!50 &7536967702774863482 88 | Rigidbody2D: 89 | serializedVersion: 4 90 | m_ObjectHideFlags: 0 91 | m_CorrespondingSourceObject: {fileID: 0} 92 | m_PrefabInstance: {fileID: 0} 93 | m_PrefabAsset: {fileID: 0} 94 | m_GameObject: {fileID: 8030361172146264872} 95 | m_BodyType: 0 96 | m_Simulated: 1 97 | m_UseFullKinematicContacts: 0 98 | m_UseAutoMass: 0 99 | m_Mass: 1 100 | m_LinearDrag: 0 101 | m_AngularDrag: 0.05 102 | m_GravityScale: 1 103 | m_Material: {fileID: 0} 104 | m_Interpolate: 0 105 | m_SleepingMode: 1 106 | m_CollisionDetection: 0 107 | m_Constraints: 0 108 | --- !u!58 &2655290458430116244 109 | CircleCollider2D: 110 | m_ObjectHideFlags: 0 111 | m_CorrespondingSourceObject: {fileID: 0} 112 | m_PrefabInstance: {fileID: 0} 113 | m_PrefabAsset: {fileID: 0} 114 | m_GameObject: {fileID: 8030361172146264872} 115 | m_Enabled: 1 116 | m_Density: 1 117 | m_Material: {fileID: 0} 118 | m_IsTrigger: 0 119 | m_UsedByEffector: 0 120 | m_UsedByComposite: 0 121 | m_Offset: {x: 0, y: 0} 122 | serializedVersion: 2 123 | m_Radius: 0.5 124 | --- !u!114 &2290323400442831729 125 | MonoBehaviour: 126 | m_ObjectHideFlags: 0 127 | m_CorrespondingSourceObject: {fileID: 0} 128 | m_PrefabInstance: {fileID: 0} 129 | m_PrefabAsset: {fileID: 0} 130 | m_GameObject: {fileID: 8030361172146264872} 131 | m_Enabled: 1 132 | m_EditorHideFlags: 0 133 | m_Script: {fileID: 11500000, guid: bb07eb4aacf628245a5390022301e740, type: 3} 134 | m_Name: 135 | m_EditorClassIdentifier: 136 | lifeSpan: 10 137 | -------------------------------------------------------------------------------- /Assets/Prefabs/Ball.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 53c0cea3f95afcd45a7fff473f904d2a 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Motor.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &2035968142703565492 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: 4128642601950330703} 12 | - component: {fileID: 8695918808015255438} 13 | m_Layer: 0 14 | m_Name: Propeller 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &4128642601950330703 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 2035968142703565492} 27 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 28 | m_LocalPosition: {x: -0.8999996, y: 0.7060001, z: 0} 29 | m_LocalScale: {x: 1.3868077, y: -0.08565864, z: 1} 30 | m_Children: [] 31 | m_Father: {fileID: 6552346232098125167} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!212 &8695918808015255438 35 | SpriteRenderer: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 2035968142703565492} 41 | m_Enabled: 1 42 | m_CastShadows: 0 43 | m_ReceiveShadows: 0 44 | m_DynamicOccludee: 1 45 | m_MotionVectors: 1 46 | m_LightProbeUsage: 1 47 | m_ReflectionProbeUsage: 1 48 | m_RayTracingMode: 0 49 | m_RenderingLayerMask: 1 50 | m_RendererPriority: 0 51 | m_Materials: 52 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 53 | m_StaticBatchInfo: 54 | firstSubMesh: 0 55 | subMeshCount: 0 56 | m_StaticBatchRoot: {fileID: 0} 57 | m_ProbeAnchor: {fileID: 0} 58 | m_LightProbeVolumeOverride: {fileID: 0} 59 | m_ScaleInLightmap: 1 60 | m_ReceiveGI: 1 61 | m_PreserveUVs: 0 62 | m_IgnoreNormalsForChartDetection: 0 63 | m_ImportantGI: 0 64 | m_StitchLightmapSeams: 1 65 | m_SelectedEditorRenderState: 0 66 | m_MinimumChartSize: 4 67 | m_AutoUVMaxDistance: 0.5 68 | m_AutoUVMaxAngle: 89 69 | m_LightmapParameters: {fileID: 0} 70 | m_SortingLayerID: 0 71 | m_SortingLayer: 0 72 | m_SortingOrder: 1 73 | m_Sprite: {fileID: 21300000, guid: 692f4be363ac5b64195cdab4e433d302, type: 3} 74 | m_Color: {r: 1, g: 1, b: 1, a: 1} 75 | m_FlipX: 0 76 | m_FlipY: 0 77 | m_DrawMode: 0 78 | m_Size: {x: 1, y: 1} 79 | m_AdaptiveModeThreshold: 0.5 80 | m_SpriteTileMode: 0 81 | m_WasSpriteAssigned: 1 82 | m_MaskInteraction: 0 83 | m_SpriteSortPoint: 0 84 | --- !u!1 &3296900177096986568 85 | GameObject: 86 | m_ObjectHideFlags: 0 87 | m_CorrespondingSourceObject: {fileID: 0} 88 | m_PrefabInstance: {fileID: 0} 89 | m_PrefabAsset: {fileID: 0} 90 | serializedVersion: 6 91 | m_Component: 92 | - component: {fileID: 6552346232098125167} 93 | m_Layer: 0 94 | m_Name: Propellers 95 | m_TagString: Propeller 96 | m_Icon: {fileID: 0} 97 | m_NavMeshLayer: 0 98 | m_StaticEditorFlags: 0 99 | m_IsActive: 1 100 | --- !u!4 &6552346232098125167 101 | Transform: 102 | m_ObjectHideFlags: 0 103 | m_CorrespondingSourceObject: {fileID: 0} 104 | m_PrefabInstance: {fileID: 0} 105 | m_PrefabAsset: {fileID: 0} 106 | m_GameObject: {fileID: 3296900177096986568} 107 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 108 | m_LocalPosition: {x: 0, y: 0, z: 0} 109 | m_LocalScale: {x: 1, y: 1, z: 1} 110 | m_Children: 111 | - {fileID: 4128642601950330703} 112 | - {fileID: 6996789708175180737} 113 | m_Father: {fileID: 7913226636448831830} 114 | m_RootOrder: 1 115 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 116 | --- !u!1 &3842782848930492955 117 | GameObject: 118 | m_ObjectHideFlags: 0 119 | m_CorrespondingSourceObject: {fileID: 0} 120 | m_PrefabInstance: {fileID: 0} 121 | m_PrefabAsset: {fileID: 0} 122 | serializedVersion: 6 123 | m_Component: 124 | - component: {fileID: 594411271360388775} 125 | - component: {fileID: 8096009302439349866} 126 | m_Layer: 0 127 | m_Name: Shaft 128 | m_TagString: Untagged 129 | m_Icon: {fileID: 0} 130 | m_NavMeshLayer: 0 131 | m_StaticEditorFlags: 0 132 | m_IsActive: 1 133 | --- !u!4 &594411271360388775 134 | Transform: 135 | m_ObjectHideFlags: 0 136 | m_CorrespondingSourceObject: {fileID: 0} 137 | m_PrefabInstance: {fileID: 0} 138 | m_PrefabAsset: {fileID: 0} 139 | m_GameObject: {fileID: 3842782848930492955} 140 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 141 | m_LocalPosition: {x: 0, y: 0.5999999, z: 0} 142 | m_LocalScale: {x: 0.14, y: 0.3, z: 1} 143 | m_Children: [] 144 | m_Father: {fileID: 7913226636448831830} 145 | m_RootOrder: 0 146 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 147 | --- !u!212 &8096009302439349866 148 | SpriteRenderer: 149 | m_ObjectHideFlags: 0 150 | m_CorrespondingSourceObject: {fileID: 0} 151 | m_PrefabInstance: {fileID: 0} 152 | m_PrefabAsset: {fileID: 0} 153 | m_GameObject: {fileID: 3842782848930492955} 154 | m_Enabled: 1 155 | m_CastShadows: 0 156 | m_ReceiveShadows: 0 157 | m_DynamicOccludee: 1 158 | m_MotionVectors: 1 159 | m_LightProbeUsage: 1 160 | m_ReflectionProbeUsage: 1 161 | m_RayTracingMode: 0 162 | m_RenderingLayerMask: 1 163 | m_RendererPriority: 0 164 | m_Materials: 165 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 166 | m_StaticBatchInfo: 167 | firstSubMesh: 0 168 | subMeshCount: 0 169 | m_StaticBatchRoot: {fileID: 0} 170 | m_ProbeAnchor: {fileID: 0} 171 | m_LightProbeVolumeOverride: {fileID: 0} 172 | m_ScaleInLightmap: 1 173 | m_ReceiveGI: 1 174 | m_PreserveUVs: 0 175 | m_IgnoreNormalsForChartDetection: 0 176 | m_ImportantGI: 0 177 | m_StitchLightmapSeams: 1 178 | m_SelectedEditorRenderState: 0 179 | m_MinimumChartSize: 4 180 | m_AutoUVMaxDistance: 0.5 181 | m_AutoUVMaxAngle: 89 182 | m_LightmapParameters: {fileID: 0} 183 | m_SortingLayerID: 0 184 | m_SortingLayer: 0 185 | m_SortingOrder: 1 186 | m_Sprite: {fileID: 21300000, guid: 692f4be363ac5b64195cdab4e433d302, type: 3} 187 | m_Color: {r: 1, g: 1, b: 1, a: 1} 188 | m_FlipX: 0 189 | m_FlipY: 0 190 | m_DrawMode: 0 191 | m_Size: {x: 1, y: 1} 192 | m_AdaptiveModeThreshold: 0.5 193 | m_SpriteTileMode: 0 194 | m_WasSpriteAssigned: 1 195 | m_MaskInteraction: 0 196 | m_SpriteSortPoint: 0 197 | --- !u!1 &6762749688801095857 198 | GameObject: 199 | m_ObjectHideFlags: 0 200 | m_CorrespondingSourceObject: {fileID: 0} 201 | m_PrefabInstance: {fileID: 0} 202 | m_PrefabAsset: {fileID: 0} 203 | serializedVersion: 6 204 | m_Component: 205 | - component: {fileID: 6996789708175180737} 206 | - component: {fileID: 5682193295520014112} 207 | m_Layer: 0 208 | m_Name: Propeller 209 | m_TagString: Untagged 210 | m_Icon: {fileID: 0} 211 | m_NavMeshLayer: 0 212 | m_StaticEditorFlags: 0 213 | m_IsActive: 1 214 | --- !u!4 &6996789708175180737 215 | Transform: 216 | m_ObjectHideFlags: 0 217 | m_CorrespondingSourceObject: {fileID: 0} 218 | m_PrefabInstance: {fileID: 0} 219 | m_PrefabAsset: {fileID: 0} 220 | m_GameObject: {fileID: 6762749688801095857} 221 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 222 | m_LocalPosition: {x: 0.8999996, y: 0.7060001, z: 0} 223 | m_LocalScale: {x: 1.3867999, y: -0.085659996, z: 1} 224 | m_Children: [] 225 | m_Father: {fileID: 6552346232098125167} 226 | m_RootOrder: 1 227 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 228 | --- !u!212 &5682193295520014112 229 | SpriteRenderer: 230 | m_ObjectHideFlags: 0 231 | m_CorrespondingSourceObject: {fileID: 0} 232 | m_PrefabInstance: {fileID: 0} 233 | m_PrefabAsset: {fileID: 0} 234 | m_GameObject: {fileID: 6762749688801095857} 235 | m_Enabled: 1 236 | m_CastShadows: 0 237 | m_ReceiveShadows: 0 238 | m_DynamicOccludee: 1 239 | m_MotionVectors: 1 240 | m_LightProbeUsage: 1 241 | m_ReflectionProbeUsage: 1 242 | m_RayTracingMode: 0 243 | m_RenderingLayerMask: 1 244 | m_RendererPriority: 0 245 | m_Materials: 246 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 247 | m_StaticBatchInfo: 248 | firstSubMesh: 0 249 | subMeshCount: 0 250 | m_StaticBatchRoot: {fileID: 0} 251 | m_ProbeAnchor: {fileID: 0} 252 | m_LightProbeVolumeOverride: {fileID: 0} 253 | m_ScaleInLightmap: 1 254 | m_ReceiveGI: 1 255 | m_PreserveUVs: 0 256 | m_IgnoreNormalsForChartDetection: 0 257 | m_ImportantGI: 0 258 | m_StitchLightmapSeams: 1 259 | m_SelectedEditorRenderState: 0 260 | m_MinimumChartSize: 4 261 | m_AutoUVMaxDistance: 0.5 262 | m_AutoUVMaxAngle: 89 263 | m_LightmapParameters: {fileID: 0} 264 | m_SortingLayerID: 0 265 | m_SortingLayer: 0 266 | m_SortingOrder: 1 267 | m_Sprite: {fileID: 21300000, guid: 692f4be363ac5b64195cdab4e433d302, type: 3} 268 | m_Color: {r: 1, g: 1, b: 1, a: 1} 269 | m_FlipX: 0 270 | m_FlipY: 0 271 | m_DrawMode: 0 272 | m_Size: {x: 1, y: 1} 273 | m_AdaptiveModeThreshold: 0.5 274 | m_SpriteTileMode: 0 275 | m_WasSpriteAssigned: 1 276 | m_MaskInteraction: 0 277 | m_SpriteSortPoint: 0 278 | --- !u!1 &7913226636448831824 279 | GameObject: 280 | m_ObjectHideFlags: 0 281 | m_CorrespondingSourceObject: {fileID: 0} 282 | m_PrefabInstance: {fileID: 0} 283 | m_PrefabAsset: {fileID: 0} 284 | serializedVersion: 6 285 | m_Component: 286 | - component: {fileID: 7913226636448831830} 287 | - component: {fileID: 7913226636448831831} 288 | - component: {fileID: 7913226636448831829} 289 | - component: {fileID: 7913226636448831828} 290 | - component: {fileID: -6309516589541701261} 291 | m_Layer: 0 292 | m_Name: Motor 293 | m_TagString: Untagged 294 | m_Icon: {fileID: 0} 295 | m_NavMeshLayer: 0 296 | m_StaticEditorFlags: 0 297 | m_IsActive: 1 298 | --- !u!4 &7913226636448831830 299 | Transform: 300 | m_ObjectHideFlags: 0 301 | m_CorrespondingSourceObject: {fileID: 0} 302 | m_PrefabInstance: {fileID: 0} 303 | m_PrefabAsset: {fileID: 0} 304 | m_GameObject: {fileID: 7913226636448831824} 305 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 306 | m_LocalPosition: {x: -4.75, y: -2.75, z: 0} 307 | m_LocalScale: {x: 0.5, y: 1, z: 1} 308 | m_Children: 309 | - {fileID: 594411271360388775} 310 | - {fileID: 6552346232098125167} 311 | m_Father: {fileID: 0} 312 | m_RootOrder: 0 313 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 314 | --- !u!212 &7913226636448831831 315 | SpriteRenderer: 316 | m_ObjectHideFlags: 0 317 | m_CorrespondingSourceObject: {fileID: 0} 318 | m_PrefabInstance: {fileID: 0} 319 | m_PrefabAsset: {fileID: 0} 320 | m_GameObject: {fileID: 7913226636448831824} 321 | m_Enabled: 1 322 | m_CastShadows: 0 323 | m_ReceiveShadows: 0 324 | m_DynamicOccludee: 1 325 | m_MotionVectors: 1 326 | m_LightProbeUsage: 1 327 | m_ReflectionProbeUsage: 1 328 | m_RayTracingMode: 0 329 | m_RenderingLayerMask: 1 330 | m_RendererPriority: 0 331 | m_Materials: 332 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 333 | m_StaticBatchInfo: 334 | firstSubMesh: 0 335 | subMeshCount: 0 336 | m_StaticBatchRoot: {fileID: 0} 337 | m_ProbeAnchor: {fileID: 0} 338 | m_LightProbeVolumeOverride: {fileID: 0} 339 | m_ScaleInLightmap: 1 340 | m_ReceiveGI: 1 341 | m_PreserveUVs: 0 342 | m_IgnoreNormalsForChartDetection: 0 343 | m_ImportantGI: 0 344 | m_StitchLightmapSeams: 1 345 | m_SelectedEditorRenderState: 0 346 | m_MinimumChartSize: 4 347 | m_AutoUVMaxDistance: 0.5 348 | m_AutoUVMaxAngle: 89 349 | m_LightmapParameters: {fileID: 0} 350 | m_SortingLayerID: 0 351 | m_SortingLayer: 0 352 | m_SortingOrder: 2 353 | m_Sprite: {fileID: 21300000, guid: 692f4be363ac5b64195cdab4e433d302, type: 3} 354 | m_Color: {r: 0.6792453, g: 0.38092625, b: 0.038447857, a: 1} 355 | m_FlipX: 0 356 | m_FlipY: 0 357 | m_DrawMode: 0 358 | m_Size: {x: 1, y: 1} 359 | m_AdaptiveModeThreshold: 0.5 360 | m_SpriteTileMode: 0 361 | m_WasSpriteAssigned: 1 362 | m_MaskInteraction: 0 363 | m_SpriteSortPoint: 0 364 | --- !u!50 &7913226636448831829 365 | Rigidbody2D: 366 | serializedVersion: 4 367 | m_ObjectHideFlags: 0 368 | m_CorrespondingSourceObject: {fileID: 0} 369 | m_PrefabInstance: {fileID: 0} 370 | m_PrefabAsset: {fileID: 0} 371 | m_GameObject: {fileID: 7913226636448831824} 372 | m_BodyType: 0 373 | m_Simulated: 1 374 | m_UseFullKinematicContacts: 0 375 | m_UseAutoMass: 0 376 | m_Mass: 1 377 | m_LinearDrag: 0 378 | m_AngularDrag: 0.05 379 | m_GravityScale: 1 380 | m_Material: {fileID: 0} 381 | m_Interpolate: 0 382 | m_SleepingMode: 1 383 | m_CollisionDetection: 0 384 | m_Constraints: 0 385 | --- !u!255 &7913226636448831828 386 | FixedJoint2D: 387 | m_ObjectHideFlags: 0 388 | m_CorrespondingSourceObject: {fileID: 0} 389 | m_PrefabInstance: {fileID: 0} 390 | m_PrefabAsset: {fileID: 0} 391 | m_GameObject: {fileID: 7913226636448831824} 392 | m_Enabled: 1 393 | serializedVersion: 4 394 | m_EnableCollision: 0 395 | m_ConnectedRigidBody: {fileID: 0} 396 | m_BreakForce: Infinity 397 | m_BreakTorque: Infinity 398 | m_AutoConfigureConnectedAnchor: 1 399 | m_Anchor: {x: 0, y: 0} 400 | m_ConnectedAnchor: {x: -0.475, y: 0.5} 401 | m_DampingRatio: 0 402 | m_Frequency: 0 403 | --- !u!114 &-6309516589541701261 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: 7913226636448831824} 410 | m_Enabled: 1 411 | m_EditorHideFlags: 0 412 | m_Script: {fileID: 11500000, guid: ec181c6eb4c5ef74fb932b07091bb9e9, type: 3} 413 | m_Name: 414 | m_EditorClassIdentifier: 415 | force: 30 416 | throttle: 0 417 | -------------------------------------------------------------------------------- /Assets/Prefabs/Motor.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b153197c55c0f384e977561abd89806d 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d671c211269c8e44e8ecc23d69590193 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/Altitude Control.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd7f8c635b0d8bc41b50a07d626c5f19 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/Altitude Control/Altitude Control.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7cbf8b6143ee53244bfd96a613a3eef6 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scenes/Altitude Control/AltitudeController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class AltitudeController : MonoBehaviour 6 | { 7 | private float _pidThrottle; 8 | private float _currentAltitude; 9 | public float verticalSpeed { get; private set; } 10 | public Motor rightMotor; 11 | public Motor leftMotor; 12 | public PID pid; 13 | public float integralLimit; 14 | public float ascendMaxSpeed; 15 | public float descendMaxSpeed; 16 | public float altitude; 17 | 18 | 19 | void FixedUpdate() 20 | { 21 | verticalSpeed = gameObject.GetComponent().velocity.y; 22 | _currentAltitude = gameObject.transform.position.y; 23 | _pidThrottle = pid.Update(altitude, _currentAltitude, Time.fixedDeltaTime); 24 | 25 | if (altitude - _currentAltitude < -5) //Engage Descend Speed Limiter if altitude difference is greater than 5 26 | { 27 | _pidThrottle = DescendSpeedLimiter(_pidThrottle, verticalSpeed, descendMaxSpeed); 28 | } 29 | 30 | //Anti Integral Windup Start 31 | if (verticalSpeed < -2f) //Descending 32 | { 33 | pid.LimitIntegral(0); 34 | } 35 | pid.LimitIntegral(integralLimit); // Ascending 36 | //Anti Integral Windup End 37 | 38 | if (verticalSpeed > ascendMaxSpeed) //Ascend Speed Limiter 39 | { 40 | _pidThrottle = 0; 41 | } 42 | 43 | rightMotor.CreateForce(_pidThrottle); 44 | leftMotor.CreateForce(_pidThrottle); 45 | } 46 | 47 | float DescendSpeedLimiter(float throttle, float verticalspeed, float maxspeed) 48 | { 49 | float newthrottle; 50 | float mass = gameObject.GetComponent().mass + rightMotor.gameObject.GetComponent().mass + leftMotor.gameObject.GetComponent().mass; 51 | float force = (rightMotor.force + leftMotor.force); 52 | float weight = -1f * mass * Physics2D.gravity.y; 53 | if (verticalspeed < -maxspeed) 54 | { 55 | newthrottle = weight / force; 56 | return newthrottle; 57 | } 58 | else return throttle; 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /Assets/Scenes/Altitude Control/AltitudeController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9537a2668be04374db082e917a0a70da 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scenes/Altitude Control/AltitudeLines.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | 6 | public class AltitudeLines : MonoBehaviour 7 | { 8 | public Transform AltitudeLine; 9 | public int LinesUntilAltitude; 10 | void Start() 11 | { 12 | for (int i = -4; i <= LinesUntilAltitude; i++) 13 | { 14 | AltitudeLine.GetChild(0).GetComponent().text = i.ToString(); 15 | Instantiate(AltitudeLine, new Vector3(0, i, 0), Quaternion.identity).transform.parent = gameObject.transform; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Assets/Scenes/Altitude Control/AltitudeLines.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a82eaf17ed8434d4ebdc5c7222e9ac4d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scenes/Altitude Control/AltitudeUI.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using System.Threading; 4 | using System.Globalization; 5 | 6 | public class AltitudeUI : MonoBehaviour 7 | { 8 | public GameObject PIDMenu; 9 | public GameObject VerticalMenu; 10 | public GameObject AltLines; 11 | public GameObject Info; 12 | public GameObject rod; 13 | public InputField PValue; 14 | public InputField IValue; 15 | public InputField DValue; 16 | public InputField ILimit; 17 | public InputField AsValue; 18 | public InputField DesValue; 19 | public InputField TarAlt; 20 | public Toggle AltToggle; 21 | public Text Speed; 22 | public Text Altitude; 23 | public Text Error; 24 | 25 | 26 | void Start() 27 | { 28 | Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB"); 29 | 30 | PValue.text = rod.GetComponent().pid.pFactor.ToString(); 31 | IValue.text = rod.GetComponent().pid.iFactor.ToString(); 32 | DValue.text = rod.GetComponent().pid.dFactor.ToString(); 33 | ILimit.text = rod.GetComponent().integralLimit.ToString(); 34 | AsValue.text = rod.GetComponent().ascendMaxSpeed.ToString(); 35 | DesValue.text = rod.GetComponent().descendMaxSpeed.ToString(); 36 | TarAlt.text = rod.GetComponent().altitude.ToString(); 37 | } 38 | 39 | private void Update() { 40 | Speed.text = rod.GetComponent().verticalSpeed.ToString("0.000"); 41 | Altitude.text = rod.GetComponent().position.y.ToString("0.000"); 42 | Error.text = (rod.GetComponent().altitude - rod.GetComponent().position.y).ToString("0.000"); 43 | } 44 | 45 | public void UpdateTarget() 46 | { 47 | if(float.TryParse(this.TarAlt.text, out float number)) 48 | { 49 | rod.GetComponent().altitude = number; 50 | } 51 | else 52 | { 53 | this.TarAlt.text = rod.GetComponent().altitude.ToString();; 54 | } 55 | } 56 | public void UpdateAsSpeed() 57 | { 58 | if(float.TryParse(this.AsValue.text, out float number)) 59 | { 60 | rod.GetComponent().ascendMaxSpeed = number; 61 | } 62 | else 63 | { 64 | this.AsValue.text = rod.GetComponent().ascendMaxSpeed.ToString();; 65 | } 66 | } 67 | public void UpdateDesSpeed() 68 | { 69 | if(float.TryParse(this.DesValue.text, out float number)) 70 | { 71 | rod.GetComponent().descendMaxSpeed = number; 72 | } 73 | else 74 | { 75 | this.DesValue.text = rod.GetComponent().descendMaxSpeed.ToString();; 76 | } 77 | } 78 | public void UpdateILimit() 79 | { 80 | if(float.TryParse(this.ILimit.text, out float number)) 81 | { 82 | rod.GetComponent().integralLimit = number; 83 | } 84 | else 85 | { 86 | this.ILimit.text = rod.GetComponent().integralLimit.ToString();; 87 | } 88 | } 89 | public void UpdatePValue() 90 | { 91 | if(float.TryParse(this.PValue.text, out float number)) 92 | { 93 | rod.GetComponent().pid.pFactor = number; 94 | } 95 | else 96 | { 97 | this.PValue.text = rod.GetComponent().pid.pFactor.ToString(); 98 | } 99 | } 100 | 101 | public void UpdateIValue() 102 | { 103 | if(float.TryParse(this.IValue.text, out float number)) 104 | { 105 | rod.GetComponent().pid.iFactor = number; 106 | } 107 | else 108 | { 109 | this.IValue.text = rod.GetComponent().pid.iFactor.ToString(); 110 | } 111 | } 112 | 113 | public void UpdateDValue() 114 | { 115 | if(float.TryParse(this.DValue.text, out float number)) 116 | { 117 | rod.GetComponent().pid.dFactor = number; 118 | } 119 | else 120 | { 121 | this.DValue.text = rod.GetComponent().pid.dFactor.ToString(); 122 | } 123 | } 124 | public void ToggleAltLines() 125 | { 126 | AltLines.SetActive(AltToggle.isOn); 127 | } 128 | public void TogglePIDMenu() 129 | { 130 | PIDMenu.SetActive(!PIDMenu.activeSelf); 131 | } 132 | 133 | public void ToggleVerticalMenu() 134 | { 135 | VerticalMenu.SetActive(!VerticalMenu.activeSelf); 136 | } 137 | 138 | public void ToggleInfoMenu() 139 | { 140 | Info.SetActive(!Info.activeSelf); 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /Assets/Scenes/Altitude Control/AltitudeUI.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2b75145c5f4c3d201b8f754e5fa2c7d3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scenes/Altitude Control/CameraFollow.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class CameraFollow : MonoBehaviour 6 | { 7 | public Transform followedObject; 8 | void Update() 9 | { 10 | if(followedObject.position.y>0) 11 | { 12 | gameObject.transform.position = new Vector3(0, followedObject.position.y, -10); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Assets/Scenes/Altitude Control/CameraFollow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7abcca3fba228664f8d196d74e77fda3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scenes/Balance Rod.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f67a1d376cf3d654187b45769b9ad5c1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/Balance Rod/Balance Rod.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2cda990e2423bbf4892e6590ba056729 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scenes/Balance Rod/BalanceController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class BalanceController : MonoBehaviour 6 | { 7 | private float _pidThrottle; 8 | public Motor rightMotor; 9 | public Motor leftMotor; 10 | public PID pid; 11 | public float Throttle; 12 | public float angle; 13 | void FixedUpdate() 14 | { 15 | Throttle = Mathf.Clamp(Throttle, 0, 1); 16 | _pidThrottle = pid.Update((angle * Mathf.PI) / 180, gameObject.transform.rotation.z*2, Time.fixedDeltaTime); 17 | rightMotor.CreateForce(Throttle + _pidThrottle); 18 | leftMotor.CreateForce(Throttle - _pidThrottle); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Assets/Scenes/Balance Rod/BalanceController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bb5b5179d2064f349bc3ec69db8e6176 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scenes/Balance Rod/BalanceUI.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.UI; 2 | using UnityEngine; 3 | using System.Threading; 4 | using System.Globalization; 5 | 6 | public class BalanceUI : MonoBehaviour 7 | { 8 | public GameObject PIDMenu; 9 | public GameObject pid; 10 | public InputField PValue; 11 | public InputField IValue; 12 | public InputField DValue; 13 | public InputField HoldAngle; 14 | public InputField Throttle; 15 | 16 | private void Start() 17 | { 18 | Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB"); 19 | 20 | PValue.text = pid.GetComponent().pid.pFactor.ToString(); 21 | IValue.text = pid.GetComponent().pid.iFactor.ToString(); 22 | DValue.text = pid.GetComponent().pid.dFactor.ToString(); 23 | Throttle.text = pid.GetComponent().Throttle.ToString(); 24 | HoldAngle.text = pid.GetComponent().angle.ToString(); 25 | 26 | } 27 | public void UpdateHoldAngle() 28 | { 29 | if(float.TryParse(this.HoldAngle.text, out float number)) 30 | { 31 | pid.GetComponent().angle = number; 32 | } 33 | else 34 | { 35 | this.HoldAngle.text = pid.GetComponent().angle.ToString(); 36 | } 37 | } 38 | public void UpdateThrottle() 39 | { 40 | if(float.TryParse(this.Throttle.text, out float number)) 41 | { 42 | //Throttle is between 0 and 1 43 | if(number > 1) 44 | { 45 | this.Throttle.text = "1"; 46 | number = 1; 47 | } 48 | else if(number < 0) 49 | { 50 | this.Throttle.text = "0"; 51 | number = 0; 52 | } 53 | pid.GetComponent().Throttle = number; 54 | } 55 | else 56 | { 57 | this.Throttle.text = pid.GetComponent().Throttle.ToString(); 58 | } 59 | } 60 | 61 | public void UpdatePValue() 62 | { 63 | if(float.TryParse(this.PValue.text, out float number)) 64 | { 65 | pid.GetComponent().pid.pFactor = number; 66 | } 67 | else 68 | { 69 | this.PValue.text = pid.GetComponent().pid.pFactor.ToString(); 70 | } 71 | } 72 | 73 | public void UpdateIValue() 74 | { 75 | if(float.TryParse(this.IValue.text, out float number)) 76 | { 77 | pid.GetComponent().pid.iFactor = number; 78 | } 79 | else 80 | { 81 | this.IValue.text = pid.GetComponent().pid.iFactor.ToString(); 82 | } 83 | } 84 | 85 | public void UpdateDValue() 86 | { 87 | if(float.TryParse(this.DValue.text, out float number)) 88 | { 89 | pid.GetComponent().pid.dFactor = number; 90 | } 91 | else 92 | { 93 | this.DValue.text = pid.GetComponent().pid.dFactor.ToString(); 94 | } 95 | } 96 | 97 | public void TogglePIDMenu() 98 | { 99 | PIDMenu.SetActive(!PIDMenu.activeSelf); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /Assets/Scenes/Balance Rod/BalanceUI.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 95cece24ccaaf733ebe3b86151d81d1e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scenes/Main Menu.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8eb422574cfe907cb329cf2e8265b47 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/Main Menu/Main Menu.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 3 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 0 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_UseShadowmask: 1 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | debug: 122 | m_Flags: 0 123 | m_NavMeshData: {fileID: 0} 124 | --- !u!1 &13171386 125 | GameObject: 126 | m_ObjectHideFlags: 0 127 | m_CorrespondingSourceObject: {fileID: 0} 128 | m_PrefabInstance: {fileID: 0} 129 | m_PrefabAsset: {fileID: 0} 130 | serializedVersion: 6 131 | m_Component: 132 | - component: {fileID: 13171390} 133 | - component: {fileID: 13171389} 134 | - component: {fileID: 13171388} 135 | - component: {fileID: 13171387} 136 | m_Layer: 5 137 | m_Name: Canvas 138 | m_TagString: Untagged 139 | m_Icon: {fileID: 0} 140 | m_NavMeshLayer: 0 141 | m_StaticEditorFlags: 0 142 | m_IsActive: 1 143 | --- !u!114 &13171387 144 | MonoBehaviour: 145 | m_ObjectHideFlags: 0 146 | m_CorrespondingSourceObject: {fileID: 0} 147 | m_PrefabInstance: {fileID: 0} 148 | m_PrefabAsset: {fileID: 0} 149 | m_GameObject: {fileID: 13171386} 150 | m_Enabled: 1 151 | m_EditorHideFlags: 0 152 | m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} 153 | m_Name: 154 | m_EditorClassIdentifier: 155 | m_IgnoreReversedGraphics: 1 156 | m_BlockingObjects: 0 157 | m_BlockingMask: 158 | serializedVersion: 2 159 | m_Bits: 4294967295 160 | --- !u!114 &13171388 161 | MonoBehaviour: 162 | m_ObjectHideFlags: 0 163 | m_CorrespondingSourceObject: {fileID: 0} 164 | m_PrefabInstance: {fileID: 0} 165 | m_PrefabAsset: {fileID: 0} 166 | m_GameObject: {fileID: 13171386} 167 | m_Enabled: 1 168 | m_EditorHideFlags: 0 169 | m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} 170 | m_Name: 171 | m_EditorClassIdentifier: 172 | m_UiScaleMode: 1 173 | m_ReferencePixelsPerUnit: 100 174 | m_ScaleFactor: 1 175 | m_ReferenceResolution: {x: 1280, y: 720} 176 | m_ScreenMatchMode: 0 177 | m_MatchWidthOrHeight: 0 178 | m_PhysicalUnit: 3 179 | m_FallbackScreenDPI: 96 180 | m_DefaultSpriteDPI: 96 181 | m_DynamicPixelsPerUnit: 1 182 | --- !u!223 &13171389 183 | Canvas: 184 | m_ObjectHideFlags: 0 185 | m_CorrespondingSourceObject: {fileID: 0} 186 | m_PrefabInstance: {fileID: 0} 187 | m_PrefabAsset: {fileID: 0} 188 | m_GameObject: {fileID: 13171386} 189 | m_Enabled: 1 190 | serializedVersion: 3 191 | m_RenderMode: 1 192 | m_Camera: {fileID: 1117548443} 193 | m_PlaneDistance: 100 194 | m_PixelPerfect: 0 195 | m_ReceivesEvents: 1 196 | m_OverrideSorting: 0 197 | m_OverridePixelPerfect: 0 198 | m_SortingBucketNormalizedSize: 0 199 | m_AdditionalShaderChannelsFlag: 0 200 | m_SortingLayerID: 0 201 | m_SortingOrder: 0 202 | m_TargetDisplay: 0 203 | --- !u!224 &13171390 204 | RectTransform: 205 | m_ObjectHideFlags: 0 206 | m_CorrespondingSourceObject: {fileID: 0} 207 | m_PrefabInstance: {fileID: 0} 208 | m_PrefabAsset: {fileID: 0} 209 | m_GameObject: {fileID: 13171386} 210 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 211 | m_LocalPosition: {x: 0, y: 0, z: 0} 212 | m_LocalScale: {x: 0, y: 0, z: 0} 213 | m_Children: 214 | - {fileID: 731237046} 215 | - {fileID: 1264015975} 216 | - {fileID: 796992455} 217 | m_Father: {fileID: 0} 218 | m_RootOrder: 2 219 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 220 | m_AnchorMin: {x: 0, y: 0} 221 | m_AnchorMax: {x: 0, y: 0} 222 | m_AnchoredPosition: {x: 0, y: 0} 223 | m_SizeDelta: {x: 0, y: 0} 224 | m_Pivot: {x: 0, y: 0} 225 | --- !u!1 &731237045 226 | GameObject: 227 | m_ObjectHideFlags: 0 228 | m_CorrespondingSourceObject: {fileID: 0} 229 | m_PrefabInstance: {fileID: 0} 230 | m_PrefabAsset: {fileID: 0} 231 | serializedVersion: 6 232 | m_Component: 233 | - component: {fileID: 731237046} 234 | - component: {fileID: 731237048} 235 | - component: {fileID: 731237047} 236 | m_Layer: 5 237 | m_Name: Title 238 | m_TagString: Untagged 239 | m_Icon: {fileID: 0} 240 | m_NavMeshLayer: 0 241 | m_StaticEditorFlags: 0 242 | m_IsActive: 1 243 | --- !u!224 &731237046 244 | RectTransform: 245 | m_ObjectHideFlags: 0 246 | m_CorrespondingSourceObject: {fileID: 0} 247 | m_PrefabInstance: {fileID: 0} 248 | m_PrefabAsset: {fileID: 0} 249 | m_GameObject: {fileID: 731237045} 250 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 251 | m_LocalPosition: {x: 0, y: 0, z: 0} 252 | m_LocalScale: {x: 1, y: 1, z: 1} 253 | m_Children: [] 254 | m_Father: {fileID: 13171390} 255 | m_RootOrder: 0 256 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 257 | m_AnchorMin: {x: 0.5, y: 1} 258 | m_AnchorMax: {x: 0.5, y: 1} 259 | m_AnchoredPosition: {x: 0, y: -95} 260 | m_SizeDelta: {x: 719.9458, y: 146.0863} 261 | m_Pivot: {x: 0.5, y: 1} 262 | --- !u!114 &731237047 263 | MonoBehaviour: 264 | m_ObjectHideFlags: 0 265 | m_CorrespondingSourceObject: {fileID: 0} 266 | m_PrefabInstance: {fileID: 0} 267 | m_PrefabAsset: {fileID: 0} 268 | m_GameObject: {fileID: 731237045} 269 | m_Enabled: 1 270 | m_EditorHideFlags: 0 271 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 272 | m_Name: 273 | m_EditorClassIdentifier: 274 | m_Material: {fileID: 0} 275 | m_Color: {r: 1, g: 1, b: 1, a: 1} 276 | m_RaycastTarget: 1 277 | m_Maskable: 1 278 | m_OnCullStateChanged: 279 | m_PersistentCalls: 280 | m_Calls: [] 281 | m_FontData: 282 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 283 | m_FontSize: 55 284 | m_FontStyle: 1 285 | m_BestFit: 1 286 | m_MinSize: 2 287 | m_MaxSize: 127 288 | m_Alignment: 4 289 | m_AlignByGeometry: 0 290 | m_RichText: 1 291 | m_HorizontalOverflow: 0 292 | m_VerticalOverflow: 0 293 | m_LineSpacing: 1 294 | m_Text: PID EXAMPLES 295 | --- !u!222 &731237048 296 | CanvasRenderer: 297 | m_ObjectHideFlags: 0 298 | m_CorrespondingSourceObject: {fileID: 0} 299 | m_PrefabInstance: {fileID: 0} 300 | m_PrefabAsset: {fileID: 0} 301 | m_GameObject: {fileID: 731237045} 302 | m_CullTransparentMesh: 0 303 | --- !u!1 &796992454 304 | GameObject: 305 | m_ObjectHideFlags: 0 306 | m_CorrespondingSourceObject: {fileID: 0} 307 | m_PrefabInstance: {fileID: 0} 308 | m_PrefabAsset: {fileID: 0} 309 | serializedVersion: 6 310 | m_Component: 311 | - component: {fileID: 796992455} 312 | - component: {fileID: 796992457} 313 | - component: {fileID: 796992456} 314 | - component: {fileID: 796992458} 315 | - component: {fileID: 796992459} 316 | m_Layer: 5 317 | m_Name: Altitude 318 | m_TagString: Untagged 319 | m_Icon: {fileID: 0} 320 | m_NavMeshLayer: 0 321 | m_StaticEditorFlags: 0 322 | m_IsActive: 1 323 | --- !u!224 &796992455 324 | RectTransform: 325 | m_ObjectHideFlags: 0 326 | m_CorrespondingSourceObject: {fileID: 0} 327 | m_PrefabInstance: {fileID: 0} 328 | m_PrefabAsset: {fileID: 0} 329 | m_GameObject: {fileID: 796992454} 330 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 331 | m_LocalPosition: {x: 0, y: 0, z: 0} 332 | m_LocalScale: {x: 1, y: 1, z: 1} 333 | m_Children: [] 334 | m_Father: {fileID: 13171390} 335 | m_RootOrder: 2 336 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 337 | m_AnchorMin: {x: 0.5, y: 0.5} 338 | m_AnchorMax: {x: 0.5, y: 0.5} 339 | m_AnchoredPosition: {x: 200, y: -80} 340 | m_SizeDelta: {x: 255.82364, y: 130.61476} 341 | m_Pivot: {x: 0.5, y: 0.5} 342 | --- !u!114 &796992456 343 | MonoBehaviour: 344 | m_ObjectHideFlags: 0 345 | m_CorrespondingSourceObject: {fileID: 0} 346 | m_PrefabInstance: {fileID: 0} 347 | m_PrefabAsset: {fileID: 0} 348 | m_GameObject: {fileID: 796992454} 349 | m_Enabled: 1 350 | m_EditorHideFlags: 0 351 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 352 | m_Name: 353 | m_EditorClassIdentifier: 354 | m_Material: {fileID: 0} 355 | m_Color: {r: 1, g: 1, b: 1, a: 1} 356 | m_RaycastTarget: 1 357 | m_Maskable: 1 358 | m_OnCullStateChanged: 359 | m_PersistentCalls: 360 | m_Calls: [] 361 | m_FontData: 362 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 363 | m_FontSize: 52 364 | m_FontStyle: 0 365 | m_BestFit: 0 366 | m_MinSize: 10 367 | m_MaxSize: 78 368 | m_Alignment: 4 369 | m_AlignByGeometry: 0 370 | m_RichText: 1 371 | m_HorizontalOverflow: 0 372 | m_VerticalOverflow: 0 373 | m_LineSpacing: 1 374 | m_Text: Altitude Controller 375 | --- !u!222 &796992457 376 | CanvasRenderer: 377 | m_ObjectHideFlags: 0 378 | m_CorrespondingSourceObject: {fileID: 0} 379 | m_PrefabInstance: {fileID: 0} 380 | m_PrefabAsset: {fileID: 0} 381 | m_GameObject: {fileID: 796992454} 382 | m_CullTransparentMesh: 0 383 | --- !u!114 &796992458 384 | MonoBehaviour: 385 | m_ObjectHideFlags: 0 386 | m_CorrespondingSourceObject: {fileID: 0} 387 | m_PrefabInstance: {fileID: 0} 388 | m_PrefabAsset: {fileID: 0} 389 | m_GameObject: {fileID: 796992454} 390 | m_Enabled: 1 391 | m_EditorHideFlags: 0 392 | m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} 393 | m_Name: 394 | m_EditorClassIdentifier: 395 | m_Delegates: 396 | - eventID: 4 397 | callback: 398 | m_PersistentCalls: 399 | m_Calls: 400 | - m_Target: {fileID: 1117548445} 401 | m_MethodName: LoadAltitude 402 | m_Mode: 1 403 | m_Arguments: 404 | m_ObjectArgument: {fileID: 0} 405 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 406 | m_IntArgument: 0 407 | m_FloatArgument: 0 408 | m_StringArgument: 409 | m_BoolArgument: 0 410 | m_CallState: 2 411 | - eventID: 0 412 | callback: 413 | m_PersistentCalls: 414 | m_Calls: 415 | - m_Target: {fileID: 796992459} 416 | m_MethodName: enterHover 417 | m_Mode: 1 418 | m_Arguments: 419 | m_ObjectArgument: {fileID: 0} 420 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 421 | m_IntArgument: 0 422 | m_FloatArgument: 0 423 | m_StringArgument: 424 | m_BoolArgument: 0 425 | m_CallState: 2 426 | - eventID: 1 427 | callback: 428 | m_PersistentCalls: 429 | m_Calls: 430 | - m_Target: {fileID: 796992459} 431 | m_MethodName: exitHover 432 | m_Mode: 1 433 | m_Arguments: 434 | m_ObjectArgument: {fileID: 0} 435 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 436 | m_IntArgument: 0 437 | m_FloatArgument: 0 438 | m_StringArgument: 439 | m_BoolArgument: 0 440 | m_CallState: 2 441 | --- !u!114 &796992459 442 | MonoBehaviour: 443 | m_ObjectHideFlags: 0 444 | m_CorrespondingSourceObject: {fileID: 0} 445 | m_PrefabInstance: {fileID: 0} 446 | m_PrefabAsset: {fileID: 0} 447 | m_GameObject: {fileID: 796992454} 448 | m_Enabled: 1 449 | m_EditorHideFlags: 0 450 | m_Script: {fileID: 11500000, guid: 17ee10dee8f4bed85a71448f9dfa53ed, type: 3} 451 | m_Name: 452 | m_EditorClassIdentifier: 453 | --- !u!1 &1003907566 454 | GameObject: 455 | m_ObjectHideFlags: 0 456 | m_CorrespondingSourceObject: {fileID: 0} 457 | m_PrefabInstance: {fileID: 0} 458 | m_PrefabAsset: {fileID: 0} 459 | serializedVersion: 6 460 | m_Component: 461 | - component: {fileID: 1003907569} 462 | - component: {fileID: 1003907568} 463 | - component: {fileID: 1003907567} 464 | m_Layer: 0 465 | m_Name: EventSystem 466 | m_TagString: Untagged 467 | m_Icon: {fileID: 0} 468 | m_NavMeshLayer: 0 469 | m_StaticEditorFlags: 0 470 | m_IsActive: 1 471 | --- !u!114 &1003907567 472 | MonoBehaviour: 473 | m_ObjectHideFlags: 0 474 | m_CorrespondingSourceObject: {fileID: 0} 475 | m_PrefabInstance: {fileID: 0} 476 | m_PrefabAsset: {fileID: 0} 477 | m_GameObject: {fileID: 1003907566} 478 | m_Enabled: 1 479 | m_EditorHideFlags: 0 480 | m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} 481 | m_Name: 482 | m_EditorClassIdentifier: 483 | m_HorizontalAxis: Horizontal 484 | m_VerticalAxis: Vertical 485 | m_SubmitButton: Submit 486 | m_CancelButton: Cancel 487 | m_InputActionsPerSecond: 10 488 | m_RepeatDelay: 0.5 489 | m_ForceModuleActive: 0 490 | --- !u!114 &1003907568 491 | MonoBehaviour: 492 | m_ObjectHideFlags: 0 493 | m_CorrespondingSourceObject: {fileID: 0} 494 | m_PrefabInstance: {fileID: 0} 495 | m_PrefabAsset: {fileID: 0} 496 | m_GameObject: {fileID: 1003907566} 497 | m_Enabled: 1 498 | m_EditorHideFlags: 0 499 | m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} 500 | m_Name: 501 | m_EditorClassIdentifier: 502 | m_FirstSelected: {fileID: 0} 503 | m_sendNavigationEvents: 1 504 | m_DragThreshold: 10 505 | --- !u!4 &1003907569 506 | Transform: 507 | m_ObjectHideFlags: 0 508 | m_CorrespondingSourceObject: {fileID: 0} 509 | m_PrefabInstance: {fileID: 0} 510 | m_PrefabAsset: {fileID: 0} 511 | m_GameObject: {fileID: 1003907566} 512 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 513 | m_LocalPosition: {x: 0, y: 0, z: 0} 514 | m_LocalScale: {x: 1, y: 1, z: 1} 515 | m_Children: [] 516 | m_Father: {fileID: 0} 517 | m_RootOrder: 3 518 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 519 | --- !u!1 &1117548441 520 | GameObject: 521 | m_ObjectHideFlags: 0 522 | m_CorrespondingSourceObject: {fileID: 0} 523 | m_PrefabInstance: {fileID: 0} 524 | m_PrefabAsset: {fileID: 0} 525 | serializedVersion: 6 526 | m_Component: 527 | - component: {fileID: 1117548444} 528 | - component: {fileID: 1117548443} 529 | - component: {fileID: 1117548442} 530 | - component: {fileID: 1117548445} 531 | m_Layer: 0 532 | m_Name: Main Camera 533 | m_TagString: MainCamera 534 | m_Icon: {fileID: 0} 535 | m_NavMeshLayer: 0 536 | m_StaticEditorFlags: 0 537 | m_IsActive: 1 538 | --- !u!81 &1117548442 539 | AudioListener: 540 | m_ObjectHideFlags: 0 541 | m_CorrespondingSourceObject: {fileID: 0} 542 | m_PrefabInstance: {fileID: 0} 543 | m_PrefabAsset: {fileID: 0} 544 | m_GameObject: {fileID: 1117548441} 545 | m_Enabled: 1 546 | --- !u!20 &1117548443 547 | Camera: 548 | m_ObjectHideFlags: 0 549 | m_CorrespondingSourceObject: {fileID: 0} 550 | m_PrefabInstance: {fileID: 0} 551 | m_PrefabAsset: {fileID: 0} 552 | m_GameObject: {fileID: 1117548441} 553 | m_Enabled: 1 554 | serializedVersion: 2 555 | m_ClearFlags: 1 556 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 557 | m_projectionMatrixMode: 1 558 | m_GateFitMode: 2 559 | m_FOVAxisMode: 0 560 | m_SensorSize: {x: 36, y: 24} 561 | m_LensShift: {x: 0, y: 0} 562 | m_FocalLength: 50 563 | m_NormalizedViewPortRect: 564 | serializedVersion: 2 565 | x: 0 566 | y: 0 567 | width: 1 568 | height: 1 569 | near clip plane: 0.3 570 | far clip plane: 1000 571 | field of view: 60 572 | orthographic: 1 573 | orthographic size: 5 574 | m_Depth: -1 575 | m_CullingMask: 576 | serializedVersion: 2 577 | m_Bits: 4294967295 578 | m_RenderingPath: -1 579 | m_TargetTexture: {fileID: 0} 580 | m_TargetDisplay: 0 581 | m_TargetEye: 3 582 | m_HDR: 1 583 | m_AllowMSAA: 1 584 | m_AllowDynamicResolution: 0 585 | m_ForceIntoRT: 0 586 | m_OcclusionCulling: 1 587 | m_StereoConvergence: 10 588 | m_StereoSeparation: 0.022 589 | --- !u!4 &1117548444 590 | Transform: 591 | m_ObjectHideFlags: 0 592 | m_CorrespondingSourceObject: {fileID: 0} 593 | m_PrefabInstance: {fileID: 0} 594 | m_PrefabAsset: {fileID: 0} 595 | m_GameObject: {fileID: 1117548441} 596 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 597 | m_LocalPosition: {x: 0, y: 0, z: -10} 598 | m_LocalScale: {x: 1, y: 1, z: 1} 599 | m_Children: [] 600 | m_Father: {fileID: 0} 601 | m_RootOrder: 0 602 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 603 | --- !u!114 &1117548445 604 | MonoBehaviour: 605 | m_ObjectHideFlags: 0 606 | m_CorrespondingSourceObject: {fileID: 0} 607 | m_PrefabInstance: {fileID: 0} 608 | m_PrefabAsset: {fileID: 0} 609 | m_GameObject: {fileID: 1117548441} 610 | m_Enabled: 1 611 | m_EditorHideFlags: 0 612 | m_Script: {fileID: 11500000, guid: 1b9f639dd86db3abda6f19ba059a2798, type: 3} 613 | m_Name: 614 | m_EditorClassIdentifier: 615 | --- !u!1 &1264015974 616 | GameObject: 617 | m_ObjectHideFlags: 0 618 | m_CorrespondingSourceObject: {fileID: 0} 619 | m_PrefabInstance: {fileID: 0} 620 | m_PrefabAsset: {fileID: 0} 621 | serializedVersion: 6 622 | m_Component: 623 | - component: {fileID: 1264015975} 624 | - component: {fileID: 1264015977} 625 | - component: {fileID: 1264015976} 626 | - component: {fileID: 1264015978} 627 | - component: {fileID: 1264015979} 628 | m_Layer: 5 629 | m_Name: Balance 630 | m_TagString: Untagged 631 | m_Icon: {fileID: 0} 632 | m_NavMeshLayer: 0 633 | m_StaticEditorFlags: 0 634 | m_IsActive: 1 635 | --- !u!224 &1264015975 636 | RectTransform: 637 | m_ObjectHideFlags: 0 638 | m_CorrespondingSourceObject: {fileID: 0} 639 | m_PrefabInstance: {fileID: 0} 640 | m_PrefabAsset: {fileID: 0} 641 | m_GameObject: {fileID: 1264015974} 642 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 643 | m_LocalPosition: {x: 0, y: 0, z: 0} 644 | m_LocalScale: {x: 1, y: 1, z: 1} 645 | m_Children: [] 646 | m_Father: {fileID: 13171390} 647 | m_RootOrder: 1 648 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 649 | m_AnchorMin: {x: 0.5, y: 0.5} 650 | m_AnchorMax: {x: 0.5, y: 0.5} 651 | m_AnchoredPosition: {x: -200, y: -80} 652 | m_SizeDelta: {x: 255.82364, y: 130.61476} 653 | m_Pivot: {x: 0.5, y: 0.5} 654 | --- !u!114 &1264015976 655 | MonoBehaviour: 656 | m_ObjectHideFlags: 0 657 | m_CorrespondingSourceObject: {fileID: 0} 658 | m_PrefabInstance: {fileID: 0} 659 | m_PrefabAsset: {fileID: 0} 660 | m_GameObject: {fileID: 1264015974} 661 | m_Enabled: 1 662 | m_EditorHideFlags: 0 663 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 664 | m_Name: 665 | m_EditorClassIdentifier: 666 | m_Material: {fileID: 0} 667 | m_Color: {r: 1, g: 1, b: 1, a: 1} 668 | m_RaycastTarget: 1 669 | m_Maskable: 1 670 | m_OnCullStateChanged: 671 | m_PersistentCalls: 672 | m_Calls: [] 673 | m_FontData: 674 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 675 | m_FontSize: 52 676 | m_FontStyle: 0 677 | m_BestFit: 0 678 | m_MinSize: 10 679 | m_MaxSize: 78 680 | m_Alignment: 4 681 | m_AlignByGeometry: 0 682 | m_RichText: 1 683 | m_HorizontalOverflow: 0 684 | m_VerticalOverflow: 0 685 | m_LineSpacing: 1 686 | m_Text: Balance Controller 687 | --- !u!222 &1264015977 688 | CanvasRenderer: 689 | m_ObjectHideFlags: 0 690 | m_CorrespondingSourceObject: {fileID: 0} 691 | m_PrefabInstance: {fileID: 0} 692 | m_PrefabAsset: {fileID: 0} 693 | m_GameObject: {fileID: 1264015974} 694 | m_CullTransparentMesh: 0 695 | --- !u!114 &1264015978 696 | MonoBehaviour: 697 | m_ObjectHideFlags: 0 698 | m_CorrespondingSourceObject: {fileID: 0} 699 | m_PrefabInstance: {fileID: 0} 700 | m_PrefabAsset: {fileID: 0} 701 | m_GameObject: {fileID: 1264015974} 702 | m_Enabled: 1 703 | m_EditorHideFlags: 0 704 | m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} 705 | m_Name: 706 | m_EditorClassIdentifier: 707 | m_Delegates: 708 | - eventID: 4 709 | callback: 710 | m_PersistentCalls: 711 | m_Calls: 712 | - m_Target: {fileID: 1117548445} 713 | m_MethodName: LoadBalance 714 | m_Mode: 1 715 | m_Arguments: 716 | m_ObjectArgument: {fileID: 0} 717 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 718 | m_IntArgument: 0 719 | m_FloatArgument: 0 720 | m_StringArgument: 721 | m_BoolArgument: 0 722 | m_CallState: 2 723 | - eventID: 0 724 | callback: 725 | m_PersistentCalls: 726 | m_Calls: 727 | - m_Target: {fileID: 1264015979} 728 | m_MethodName: enterHover 729 | m_Mode: 1 730 | m_Arguments: 731 | m_ObjectArgument: {fileID: 0} 732 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 733 | m_IntArgument: 0 734 | m_FloatArgument: 0 735 | m_StringArgument: 736 | m_BoolArgument: 0 737 | m_CallState: 2 738 | - eventID: 1 739 | callback: 740 | m_PersistentCalls: 741 | m_Calls: 742 | - m_Target: {fileID: 1264015979} 743 | m_MethodName: exitHover 744 | m_Mode: 1 745 | m_Arguments: 746 | m_ObjectArgument: {fileID: 0} 747 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 748 | m_IntArgument: 0 749 | m_FloatArgument: 0 750 | m_StringArgument: 751 | m_BoolArgument: 0 752 | m_CallState: 2 753 | --- !u!114 &1264015979 754 | MonoBehaviour: 755 | m_ObjectHideFlags: 0 756 | m_CorrespondingSourceObject: {fileID: 0} 757 | m_PrefabInstance: {fileID: 0} 758 | m_PrefabAsset: {fileID: 0} 759 | m_GameObject: {fileID: 1264015974} 760 | m_Enabled: 1 761 | m_EditorHideFlags: 0 762 | m_Script: {fileID: 11500000, guid: 17ee10dee8f4bed85a71448f9dfa53ed, type: 3} 763 | m_Name: 764 | m_EditorClassIdentifier: 765 | --- !u!1 &1838593691 766 | GameObject: 767 | m_ObjectHideFlags: 0 768 | m_CorrespondingSourceObject: {fileID: 0} 769 | m_PrefabInstance: {fileID: 0} 770 | m_PrefabAsset: {fileID: 0} 771 | serializedVersion: 6 772 | m_Component: 773 | - component: {fileID: 1838593693} 774 | - component: {fileID: 1838593692} 775 | m_Layer: 0 776 | m_Name: Ground 777 | m_TagString: Untagged 778 | m_Icon: {fileID: 0} 779 | m_NavMeshLayer: 0 780 | m_StaticEditorFlags: 0 781 | m_IsActive: 1 782 | --- !u!212 &1838593692 783 | SpriteRenderer: 784 | m_ObjectHideFlags: 0 785 | m_CorrespondingSourceObject: {fileID: 0} 786 | m_PrefabInstance: {fileID: 0} 787 | m_PrefabAsset: {fileID: 0} 788 | m_GameObject: {fileID: 1838593691} 789 | m_Enabled: 1 790 | m_CastShadows: 0 791 | m_ReceiveShadows: 0 792 | m_DynamicOccludee: 1 793 | m_MotionVectors: 1 794 | m_LightProbeUsage: 1 795 | m_ReflectionProbeUsage: 1 796 | m_RayTracingMode: 0 797 | m_RenderingLayerMask: 1 798 | m_RendererPriority: 0 799 | m_Materials: 800 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 801 | m_StaticBatchInfo: 802 | firstSubMesh: 0 803 | subMeshCount: 0 804 | m_StaticBatchRoot: {fileID: 0} 805 | m_ProbeAnchor: {fileID: 0} 806 | m_LightProbeVolumeOverride: {fileID: 0} 807 | m_ScaleInLightmap: 1 808 | m_ReceiveGI: 1 809 | m_PreserveUVs: 0 810 | m_IgnoreNormalsForChartDetection: 0 811 | m_ImportantGI: 0 812 | m_StitchLightmapSeams: 1 813 | m_SelectedEditorRenderState: 0 814 | m_MinimumChartSize: 4 815 | m_AutoUVMaxDistance: 0.5 816 | m_AutoUVMaxAngle: 89 817 | m_LightmapParameters: {fileID: 0} 818 | m_SortingLayerID: 0 819 | m_SortingLayer: 0 820 | m_SortingOrder: 0 821 | m_Sprite: {fileID: 21300000, guid: 692f4be363ac5b64195cdab4e433d302, type: 3} 822 | m_Color: {r: 0.09293603, g: 0.38679248, b: 0.018244926, a: 1} 823 | m_FlipX: 0 824 | m_FlipY: 0 825 | m_DrawMode: 0 826 | m_Size: {x: 1, y: 1} 827 | m_AdaptiveModeThreshold: 0.5 828 | m_SpriteTileMode: 0 829 | m_WasSpriteAssigned: 1 830 | m_MaskInteraction: 0 831 | m_SpriteSortPoint: 0 832 | --- !u!4 &1838593693 833 | Transform: 834 | m_ObjectHideFlags: 0 835 | m_CorrespondingSourceObject: {fileID: 0} 836 | m_PrefabInstance: {fileID: 0} 837 | m_PrefabAsset: {fileID: 0} 838 | m_GameObject: {fileID: 1838593691} 839 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 840 | m_LocalPosition: {x: 0, y: -5, z: 0} 841 | m_LocalScale: {x: 20, y: 1, z: 1} 842 | m_Children: [] 843 | m_Father: {fileID: 0} 844 | m_RootOrder: 1 845 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 846 | -------------------------------------------------------------------------------- /Assets/Scenes/Main Menu/Main Menu.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e8acf6953c51e54fa979b1af781f44de 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scenes/Main Menu/SceneController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.SceneManagement; 5 | 6 | public class SceneController : MonoBehaviour 7 | { 8 | public void LoadBalance() 9 | { 10 | SceneManager.LoadScene("Balance Rod"); 11 | } 12 | 13 | public void LoadAltitude() 14 | { 15 | SceneManager.LoadScene("Altitude Control"); 16 | } 17 | 18 | public void LoadMenu() 19 | { 20 | SceneManager.LoadScene("Main Menu"); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Assets/Scenes/Main Menu/SceneController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b9f639dd86db3abda6f19ba059a2798 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scenes/Main Menu/TextStyle.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | using System.Globalization; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | 6 | public class TextStyle : MonoBehaviour 7 | { 8 | private void Start() 9 | { 10 | Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB"); 11 | } 12 | public void enterHover() 13 | { 14 | this.GetComponent().color = Color.red; 15 | } 16 | 17 | public void exitHover() 18 | { 19 | this.GetComponent().color = Color.white; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets/Scenes/Main Menu/TextStyle.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 17ee10dee8f4bed85a71448f9dfa53ed 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.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d176eae6f9301f94db18e81eaab146fe 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Ball.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class Ball : MonoBehaviour 6 | { 7 | private Rigidbody2D _rb; 8 | private Vector2 _screenBounds; 9 | public float lifeSpan = 10f; 10 | private float _timer; 11 | private void Start() 12 | { 13 | _screenBounds = Camera.main.ScreenToWorldPoint(new Vector2(Screen.width, Screen.height)); 14 | _rb = gameObject.GetComponent(); 15 | } 16 | void Update() 17 | { 18 | _timer += Time.deltaTime; 19 | if (-(_rb.position.y) > _screenBounds.y) 20 | { 21 | Destroy(this.gameObject); 22 | 23 | } 24 | if(_timer>lifeSpan) 25 | { 26 | Destroy(this.gameObject); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Assets/Scripts/Ball.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bb07eb4aacf628245a5390022301e740 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/BallManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.EventSystems; 5 | 6 | public class BallManager : MonoBehaviour 7 | { 8 | public GameObject Ball; 9 | public EventSystem EventSystem; 10 | private void Update() 11 | { 12 | if(Input.GetMouseButtonDown(0)) 13 | { 14 | if(!EventSystem.current.IsPointerOverGameObject()) //Do not spawn ball if UI Element is clicked 15 | { 16 | Vector3 mousePos = Input.mousePosition; 17 | mousePos.z = 10.0f; 18 | Instantiate(Ball, Camera.main.ScreenToWorldPoint(mousePos), Quaternion.identity); 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Assets/Scripts/BallManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22dca9c51438ef3498b7e190ea172346 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/Motor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class Motor : MonoBehaviour 6 | { 7 | private Rigidbody2D _rb; 8 | private Transform _propellers; 9 | private float _propspeed; 10 | private float _propstate = Mathf.PI / 2; 11 | public float force = 50; 12 | public float throttle = 0; 13 | private void Start() 14 | { 15 | _rb = gameObject.GetComponent(); 16 | foreach (Transform child in transform) 17 | { 18 | if (child.CompareTag("Propeller")) 19 | _propellers = child; 20 | } 21 | } 22 | private void Update() 23 | { 24 | _propellers.transform.localScale = new Vector3(Mathf.Sin(_propstate), 1, 1); //Propeller Animation 25 | _propspeed = throttle / 5; //Propeller Animation 26 | _propstate += _propspeed; //Propeller Animation 27 | } 28 | public void CreateForce(float throttle) 29 | { 30 | this.throttle = throttle; 31 | this.throttle = Mathf.Clamp(this.throttle, 0, 1); 32 | _rb.AddRelativeForce(Vector2.up * force * this.throttle); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Assets/Scripts/Motor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec181c6eb4c5ef74fb932b07091bb9e9 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/PID.cs: -------------------------------------------------------------------------------- 1 | [System.Serializable] 2 | public class PID 3 | { 4 | public float pFactor, iFactor, dFactor; 5 | 6 | private float _integral; 7 | private float _lastError; 8 | public PID(float pFactor, float iFactor, float dFactor) 9 | { 10 | this.pFactor = pFactor; 11 | this.iFactor = iFactor; 12 | this.dFactor = dFactor; 13 | } 14 | public float Update(float target, float current, float deltatime) 15 | { 16 | float error = target - current; 17 | _integral += error * deltatime; 18 | float derivative = (error - _lastError) / deltatime; 19 | _lastError = error; 20 | return error * pFactor + _integral * iFactor + derivative * dFactor; 21 | } 22 | public void LimitIntegral(float value) 23 | { 24 | if (_integral >= value) 25 | { 26 | _integral = value; 27 | } 28 | if (_integral <= -value) 29 | { 30 | _integral = -value; 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Assets/Scripts/PID.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 805013103fb237a43b39a2ab36618827 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Sprites.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8f6f1733cc2c99488753d8296bed354 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Sprites/Circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atknssl/Unity-PID-Examples/7d824f23b662faa31e60943beabca099866d9940/Assets/Sprites/Circle.png -------------------------------------------------------------------------------- /Assets/Sprites/Circle.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d41745d1b38edad47b22ea7dae227e87 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 0 35 | aniso: 1 36 | mipBias: 0 37 | wrapU: 0 38 | wrapV: 0 39 | wrapW: 0 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 3 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 4 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 3 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: 4 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | forceMaximumCompressionQuality_BC6H_BC7: 0 73 | spriteSheet: 74 | serializedVersion: 2 75 | sprites: [] 76 | outline: 77 | - - {x: 0, y: 2} 78 | - {x: -0.09813535, y: 1.9975909} 79 | - {x: -0.19603428, y: 1.9903694} 80 | - {x: -0.29346094, y: 1.978353} 81 | - {x: -0.39018065, y: 1.9615705} 82 | - {x: -0.4859604, y: 1.9400625} 83 | - {x: -0.5805693, y: 1.9138807} 84 | - {x: -0.67377967, y: 1.8830881} 85 | - {x: -0.76536685, y: 1.8477591} 86 | - {x: -0.8551101, y: 1.8079786} 87 | - {x: -0.9427934, y: 1.7638426} 88 | - {x: -1.0282055, y: 1.7154572} 89 | - {x: -1.1111405, y: 1.6629392} 90 | - {x: -1.1913986, y: 1.606415} 91 | - {x: -1.2687867, y: 1.5460209} 92 | - {x: -1.343118, y: 1.4819021} 93 | - {x: -1.4142137, y: 1.4142134} 94 | - {x: -1.4819024, y: 1.3431177} 95 | - {x: -1.5460211, y: 1.2687864} 96 | - {x: -1.6064153, y: 1.1913984} 97 | - {x: -1.6629394, y: 1.1111403} 98 | - {x: -1.7154574, y: 1.0282052} 99 | - {x: -1.7638427, y: 0.94279313} 100 | - {x: -1.8079787, y: 0.8551098} 101 | - {x: -1.8477592, y: 0.76536644} 102 | - {x: -1.8830884, y: 0.6737792} 103 | - {x: -1.9138808, y: 0.5805688} 104 | - {x: -1.9400626, y: 0.48595977} 105 | - {x: -1.9615707, y: 0.39018002} 106 | - {x: -1.9783531, y: 0.29346028} 107 | - {x: -1.9903696, y: 0.19603357} 108 | - {x: -1.9975909, y: 0.098134585} 109 | - {x: -2, y: -0.0000008026785} 110 | - {x: -1.9975909, y: -0.09813619} 111 | - {x: -1.9903693, y: -0.19603516} 112 | - {x: -1.9783529, y: -0.29346186} 113 | - {x: -1.9615704, y: -0.3901816} 114 | - {x: -1.9400623, y: -0.48596132} 115 | - {x: -1.9138803, y: -0.58057034} 116 | - {x: -1.8830878, y: -0.67378074} 117 | - {x: -1.8477587, y: -0.7653679} 118 | - {x: -1.8079782, y: -0.855111} 119 | - {x: -1.7638422, y: -0.9427941} 120 | - {x: -1.715457, y: -1.028206} 121 | - {x: -1.6629391, y: -1.1111407} 122 | - {x: -1.606415, y: -1.1913987} 123 | - {x: -1.546021, y: -1.2687865} 124 | - {x: -1.4819025, y: -1.3431177} 125 | - {x: -1.4142139, y: -1.4142132} 126 | - {x: -1.3431184, y: -1.4819018} 127 | - {x: -1.2687873, y: -1.5460204} 128 | - {x: -1.1913995, y: -1.6064144} 129 | - {x: -1.1111416, y: -1.6629385} 130 | - {x: -1.0282067, y: -1.7154565} 131 | - {x: -0.9427949, y: -1.7638417} 132 | - {x: -0.85511184, y: -1.8079778} 133 | - {x: -0.76536876, y: -1.8477583} 134 | - {x: -0.6737818, y: -1.8830874} 135 | - {x: -0.5805717, y: -1.91388} 136 | - {x: -0.48596293, y: -1.9400618} 137 | - {x: -0.39018345, y: -1.96157} 138 | - {x: -0.29346398, y: -1.9783525} 139 | - {x: -0.1960375, y: -1.9903691} 140 | - {x: -0.09813879, y: -1.9975908} 141 | - {x: -0.0000036398517, y: -2} 142 | - {x: 0.098131515, y: -1.9975911} 143 | - {x: 0.19603026, y: -1.9903698} 144 | - {x: 0.29345676, y: -1.9783536} 145 | - {x: 0.3901763, y: -1.9615715} 146 | - {x: 0.48595586, y: -1.9400636} 147 | - {x: 0.58056474, y: -1.913882} 148 | - {x: 0.67377496, y: -1.8830898} 149 | - {x: 0.765362, y: -1.847761} 150 | - {x: 0.8551053, y: -1.8079809} 151 | - {x: 0.94278854, y: -1.7638452} 152 | - {x: 1.0282005, y: -1.7154602} 153 | - {x: 1.1111355, y: -1.6629425} 154 | - {x: 1.1913936, y: -1.6064187} 155 | - {x: 1.2687817, y: -1.5460249} 156 | - {x: 1.3431131, y: -1.4819067} 157 | - {x: 1.4142088, y: -1.4142184} 158 | - {x: 1.4818976, y: -1.3431231} 159 | - {x: 1.5460167, y: -1.2687918} 160 | - {x: 1.6064112, y: -1.1914037} 161 | - {x: 1.6629357, y: -1.1111456} 162 | - {x: 1.7154542, y: -1.0282105} 163 | - {x: 1.7638398, y: -0.94279844} 164 | - {x: 1.8079762, y: -0.855115} 165 | - {x: 1.8477571, y: -0.76537156} 166 | - {x: 1.8830866, y: -0.6737842} 167 | - {x: 1.9138794, y: -0.5805737} 168 | - {x: 1.9400615, y: -0.48596448} 169 | - {x: 1.9615698, y: -0.39018452} 170 | - {x: 1.9783524, y: -0.29346457} 171 | - {x: 1.9903691, y: -0.19603767} 172 | - {x: 1.9975908, y: -0.09813846} 173 | - {x: 2, y: -0.0000028371733} 174 | - {x: 1.997591, y: 0.0981328} 175 | - {x: 1.9903697, y: 0.19603202} 176 | - {x: 1.9783533, y: 0.29345897} 177 | - {x: 1.9615709, y: 0.39017895} 178 | - {x: 1.9400629, y: 0.48595896} 179 | - {x: 1.9138811, y: 0.58056825} 180 | - {x: 1.8830885, y: 0.6737789} 181 | - {x: 1.8477592, y: 0.7653663} 182 | - {x: 1.8079787, y: 0.8551099} 183 | - {x: 1.7638426, y: 0.9427934} 184 | - {x: 1.7154571, y: 1.0282056} 185 | - {x: 1.662939, y: 1.1111408} 186 | - {x: 1.6064146, y: 1.1913992} 187 | - {x: 1.5460203, y: 1.2687874} 188 | - {x: 1.4819014, y: 1.3431189} 189 | - {x: 1.4142125, y: 1.4142147} 190 | - {x: 1.3431165, y: 1.4819036} 191 | - {x: 1.2687849, y: 1.5460223} 192 | - {x: 1.1913966, y: 1.6064166} 193 | - {x: 1.1111382, y: 1.6629407} 194 | - {x: 1.0282029, y: 1.7154588} 195 | - {x: 0.94279057, y: 1.7638441} 196 | - {x: 0.85510695, y: 1.8079801} 197 | - {x: 0.76536334, y: 1.8477606} 198 | - {x: 0.67377585, y: 1.8830895} 199 | - {x: 0.58056515, y: 1.9138819} 200 | - {x: 0.48595583, y: 1.9400636} 201 | - {x: 0.3901758, y: 1.9615716} 202 | - {x: 0.29345578, y: 1.9783537} 203 | - {x: 0.1960288, y: 1.99037} 204 | - {x: 0.09812956, y: 1.9975911} 205 | physicsShape: 206 | - - {x: 0, y: 2} 207 | - {x: -0.09813535, y: 1.9975909} 208 | - {x: -0.19603428, y: 1.9903694} 209 | - {x: -0.29346094, y: 1.978353} 210 | - {x: -0.39018065, y: 1.9615705} 211 | - {x: -0.4859604, y: 1.9400625} 212 | - {x: -0.5805693, y: 1.9138807} 213 | - {x: -0.67377967, y: 1.8830881} 214 | - {x: -0.76536685, y: 1.8477591} 215 | - {x: -0.8551101, y: 1.8079786} 216 | - {x: -0.9427934, y: 1.7638426} 217 | - {x: -1.0282055, y: 1.7154572} 218 | - {x: -1.1111405, y: 1.6629392} 219 | - {x: -1.1913986, y: 1.606415} 220 | - {x: -1.2687867, y: 1.5460209} 221 | - {x: -1.343118, y: 1.4819021} 222 | - {x: -1.4142137, y: 1.4142134} 223 | - {x: -1.4819024, y: 1.3431177} 224 | - {x: -1.5460211, y: 1.2687864} 225 | - {x: -1.6064153, y: 1.1913984} 226 | - {x: -1.6629394, y: 1.1111403} 227 | - {x: -1.7154574, y: 1.0282052} 228 | - {x: -1.7638427, y: 0.94279313} 229 | - {x: -1.8079787, y: 0.8551098} 230 | - {x: -1.8477592, y: 0.76536644} 231 | - {x: -1.8830884, y: 0.6737792} 232 | - {x: -1.9138808, y: 0.5805688} 233 | - {x: -1.9400626, y: 0.48595977} 234 | - {x: -1.9615707, y: 0.39018002} 235 | - {x: -1.9783531, y: 0.29346028} 236 | - {x: -1.9903696, y: 0.19603357} 237 | - {x: -1.9975909, y: 0.098134585} 238 | - {x: -2, y: -0.0000008026785} 239 | - {x: -1.9975909, y: -0.09813619} 240 | - {x: -1.9903693, y: -0.19603516} 241 | - {x: -1.9783529, y: -0.29346186} 242 | - {x: -1.9615704, y: -0.3901816} 243 | - {x: -1.9400623, y: -0.48596132} 244 | - {x: -1.9138803, y: -0.58057034} 245 | - {x: -1.8830878, y: -0.67378074} 246 | - {x: -1.8477587, y: -0.7653679} 247 | - {x: -1.8079782, y: -0.855111} 248 | - {x: -1.7638422, y: -0.9427941} 249 | - {x: -1.715457, y: -1.028206} 250 | - {x: -1.6629391, y: -1.1111407} 251 | - {x: -1.606415, y: -1.1913987} 252 | - {x: -1.546021, y: -1.2687865} 253 | - {x: -1.4819025, y: -1.3431177} 254 | - {x: -1.4142139, y: -1.4142132} 255 | - {x: -1.3431184, y: -1.4819018} 256 | - {x: -1.2687873, y: -1.5460204} 257 | - {x: -1.1913995, y: -1.6064144} 258 | - {x: -1.1111416, y: -1.6629385} 259 | - {x: -1.0282067, y: -1.7154565} 260 | - {x: -0.9427949, y: -1.7638417} 261 | - {x: -0.85511184, y: -1.8079778} 262 | - {x: -0.76536876, y: -1.8477583} 263 | - {x: -0.6737818, y: -1.8830874} 264 | - {x: -0.5805717, y: -1.91388} 265 | - {x: -0.48596293, y: -1.9400618} 266 | - {x: -0.39018345, y: -1.96157} 267 | - {x: -0.29346398, y: -1.9783525} 268 | - {x: -0.1960375, y: -1.9903691} 269 | - {x: -0.09813879, y: -1.9975908} 270 | - {x: -0.0000036398517, y: -2} 271 | - {x: 0.098131515, y: -1.9975911} 272 | - {x: 0.19603026, y: -1.9903698} 273 | - {x: 0.29345676, y: -1.9783536} 274 | - {x: 0.3901763, y: -1.9615715} 275 | - {x: 0.48595586, y: -1.9400636} 276 | - {x: 0.58056474, y: -1.913882} 277 | - {x: 0.67377496, y: -1.8830898} 278 | - {x: 0.765362, y: -1.847761} 279 | - {x: 0.8551053, y: -1.8079809} 280 | - {x: 0.94278854, y: -1.7638452} 281 | - {x: 1.0282005, y: -1.7154602} 282 | - {x: 1.1111355, y: -1.6629425} 283 | - {x: 1.1913936, y: -1.6064187} 284 | - {x: 1.2687817, y: -1.5460249} 285 | - {x: 1.3431131, y: -1.4819067} 286 | - {x: 1.4142088, y: -1.4142184} 287 | - {x: 1.4818976, y: -1.3431231} 288 | - {x: 1.5460167, y: -1.2687918} 289 | - {x: 1.6064112, y: -1.1914037} 290 | - {x: 1.6629357, y: -1.1111456} 291 | - {x: 1.7154542, y: -1.0282105} 292 | - {x: 1.7638398, y: -0.94279844} 293 | - {x: 1.8079762, y: -0.855115} 294 | - {x: 1.8477571, y: -0.76537156} 295 | - {x: 1.8830866, y: -0.6737842} 296 | - {x: 1.9138794, y: -0.5805737} 297 | - {x: 1.9400615, y: -0.48596448} 298 | - {x: 1.9615698, y: -0.39018452} 299 | - {x: 1.9783524, y: -0.29346457} 300 | - {x: 1.9903691, y: -0.19603767} 301 | - {x: 1.9975908, y: -0.09813846} 302 | - {x: 2, y: -0.0000028371733} 303 | - {x: 1.997591, y: 0.0981328} 304 | - {x: 1.9903697, y: 0.19603202} 305 | - {x: 1.9783533, y: 0.29345897} 306 | - {x: 1.9615709, y: 0.39017895} 307 | - {x: 1.9400629, y: 0.48595896} 308 | - {x: 1.9138811, y: 0.58056825} 309 | - {x: 1.8830885, y: 0.6737789} 310 | - {x: 1.8477592, y: 0.7653663} 311 | - {x: 1.8079787, y: 0.8551099} 312 | - {x: 1.7638426, y: 0.9427934} 313 | - {x: 1.7154571, y: 1.0282056} 314 | - {x: 1.662939, y: 1.1111408} 315 | - {x: 1.6064146, y: 1.1913992} 316 | - {x: 1.5460203, y: 1.2687874} 317 | - {x: 1.4819014, y: 1.3431189} 318 | - {x: 1.4142125, y: 1.4142147} 319 | - {x: 1.3431165, y: 1.4819036} 320 | - {x: 1.2687849, y: 1.5460223} 321 | - {x: 1.1913966, y: 1.6064166} 322 | - {x: 1.1111382, y: 1.6629407} 323 | - {x: 1.0282029, y: 1.7154588} 324 | - {x: 0.94279057, y: 1.7638441} 325 | - {x: 0.85510695, y: 1.8079801} 326 | - {x: 0.76536334, y: 1.8477606} 327 | - {x: 0.67377585, y: 1.8830895} 328 | - {x: 0.58056515, y: 1.9138819} 329 | - {x: 0.48595583, y: 1.9400636} 330 | - {x: 0.3901758, y: 1.9615716} 331 | - {x: 0.29345578, y: 1.9783537} 332 | - {x: 0.1960288, y: 1.99037} 333 | - {x: 0.09812956, y: 1.9975911} 334 | bones: [] 335 | spriteID: 5e97eb03825dee720800000000000000 336 | internalID: 0 337 | vertices: [] 338 | indices: 339 | edges: [] 340 | weights: [] 341 | secondaryTextures: [] 342 | spritePackingTag: 343 | pSDRemoveMatte: 0 344 | pSDShowRemoveMatteOption: 0 345 | userData: 346 | assetBundleName: 347 | assetBundleVariant: 348 | -------------------------------------------------------------------------------- /Assets/Sprites/Rectangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atknssl/Unity-PID-Examples/7d824f23b662faa31e60943beabca099866d9940/Assets/Sprites/Rectangle.png -------------------------------------------------------------------------------- /Assets/Sprites/Rectangle.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 692f4be363ac5b64195cdab4e433d302 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 0 35 | aniso: 1 36 | mipBias: 0 37 | wrapU: 0 38 | wrapV: 0 39 | wrapW: 0 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 3 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 4 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 3 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: 4 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | forceMaximumCompressionQuality_BC6H_BC7: 0 73 | spriteSheet: 74 | serializedVersion: 2 75 | sprites: [] 76 | outline: 77 | - - {x: -2, y: -2} 78 | - {x: -2, y: 2} 79 | - {x: 2, y: 2} 80 | - {x: 2, y: -2} 81 | physicsShape: 82 | - - {x: -2, y: -2} 83 | - {x: -2, y: 2} 84 | - {x: 2, y: 2} 85 | - {x: 2, y: -2} 86 | bones: [] 87 | spriteID: 5e97eb03825dee720800000000000000 88 | internalID: 0 89 | vertices: [] 90 | indices: 91 | edges: [] 92 | weights: [] 93 | secondaryTextures: [] 94 | spritePackingTag: 95 | pSDRemoveMatte: 0 96 | pSDShowRemoveMatteOption: 0 97 | userData: 98 | assetBundleName: 99 | assetBundleVariant: 100 | -------------------------------------------------------------------------------- /Assets/Sprites/Triangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atknssl/Unity-PID-Examples/7d824f23b662faa31e60943beabca099866d9940/Assets/Sprites/Triangle.png -------------------------------------------------------------------------------- /Assets/Sprites/Triangle.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9d46189f71eacba4793b38d669de2c94 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 0 35 | aniso: 1 36 | mipBias: 0 37 | wrapU: 0 38 | wrapV: 0 39 | wrapW: 0 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 3 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 4 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 3 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: 4 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | forceMaximumCompressionQuality_BC6H_BC7: 0 73 | spriteSheet: 74 | serializedVersion: 2 75 | sprites: [] 76 | outline: 77 | - - {x: 0, y: 2} 78 | - {x: -1.7320508, y: -1.0000001} 79 | - {x: 1.7320509, y: -0.9999998} 80 | physicsShape: 81 | - - {x: 0, y: 2} 82 | - {x: -1.7320508, y: -1.0000001} 83 | - {x: 1.7320509, y: -0.9999998} 84 | bones: [] 85 | spriteID: 5e97eb03825dee720800000000000000 86 | internalID: 0 87 | vertices: [] 88 | indices: 89 | edges: [] 90 | weights: [] 91 | secondaryTextures: [] 92 | spritePackingTag: 93 | pSDRemoveMatte: 0 94 | pSDShowRemoveMatteOption: 0 95 | userData: 96 | assetBundleName: 97 | assetBundleVariant: 98 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020 Atakan Suslu 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /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.ide.visualstudio": "2.0.2", 6 | "com.unity.ide.vscode": "1.2.1", 7 | "com.unity.test-framework": "1.1.16", 8 | "com.unity.textmeshpro": "2.1.3", 9 | "com.unity.timeline": "1.2.12", 10 | "com.unity.ugui": "1.0.0", 11 | "com.unity.modules.ai": "1.0.0", 12 | "com.unity.modules.androidjni": "1.0.0", 13 | "com.unity.modules.animation": "1.0.0", 14 | "com.unity.modules.assetbundle": "1.0.0", 15 | "com.unity.modules.audio": "1.0.0", 16 | "com.unity.modules.cloth": "1.0.0", 17 | "com.unity.modules.director": "1.0.0", 18 | "com.unity.modules.imageconversion": "1.0.0", 19 | "com.unity.modules.imgui": "1.0.0", 20 | "com.unity.modules.jsonserialize": "1.0.0", 21 | "com.unity.modules.particlesystem": "1.0.0", 22 | "com.unity.modules.physics": "1.0.0", 23 | "com.unity.modules.physics2d": "1.0.0", 24 | "com.unity.modules.screencapture": "1.0.0", 25 | "com.unity.modules.terrain": "1.0.0", 26 | "com.unity.modules.terrainphysics": "1.0.0", 27 | "com.unity.modules.tilemap": "1.0.0", 28 | "com.unity.modules.ui": "1.0.0", 29 | "com.unity.modules.uielements": "1.0.0", 30 | "com.unity.modules.umbra": "1.0.0", 31 | "com.unity.modules.unityanalytics": "1.0.0", 32 | "com.unity.modules.unitywebrequest": "1.0.0", 33 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 34 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 35 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 36 | "com.unity.modules.unitywebrequestwww": "1.0.0", 37 | "com.unity.modules.vehicles": "1.0.0", 38 | "com.unity.modules.video": "1.0.0", 39 | "com.unity.modules.vr": "1.0.0", 40 | "com.unity.modules.wind": "1.0.0", 41 | "com.unity.modules.xr": "1.0.0" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.2d.sprite": { 4 | "version": "1.0.0", 5 | "depth": 0, 6 | "source": "builtin", 7 | "dependencies": {} 8 | }, 9 | "com.unity.2d.tilemap": { 10 | "version": "1.0.0", 11 | "depth": 0, 12 | "source": "builtin", 13 | "dependencies": {} 14 | }, 15 | "com.unity.ext.nunit": { 16 | "version": "1.0.0", 17 | "depth": 1, 18 | "source": "registry", 19 | "dependencies": {}, 20 | "url": "https://packages.unity.com" 21 | }, 22 | "com.unity.ide.visualstudio": { 23 | "version": "2.0.2", 24 | "depth": 0, 25 | "source": "registry", 26 | "dependencies": {}, 27 | "url": "https://packages.unity.com" 28 | }, 29 | "com.unity.ide.vscode": { 30 | "version": "1.2.1", 31 | "depth": 0, 32 | "source": "registry", 33 | "dependencies": {}, 34 | "url": "https://packages.unity.com" 35 | }, 36 | "com.unity.test-framework": { 37 | "version": "1.1.16", 38 | "depth": 0, 39 | "source": "registry", 40 | "dependencies": { 41 | "com.unity.ext.nunit": "1.0.0", 42 | "com.unity.modules.imgui": "1.0.0", 43 | "com.unity.modules.jsonserialize": "1.0.0" 44 | }, 45 | "url": "https://packages.unity.com" 46 | }, 47 | "com.unity.textmeshpro": { 48 | "version": "2.1.3", 49 | "depth": 0, 50 | "source": "registry", 51 | "dependencies": { 52 | "com.unity.ugui": "1.0.0" 53 | }, 54 | "url": "https://packages.unity.com" 55 | }, 56 | "com.unity.timeline": { 57 | "version": "1.2.12", 58 | "depth": 0, 59 | "source": "registry", 60 | "dependencies": {}, 61 | "url": "https://packages.unity.com" 62 | }, 63 | "com.unity.ugui": { 64 | "version": "1.0.0", 65 | "depth": 0, 66 | "source": "builtin", 67 | "dependencies": { 68 | "com.unity.modules.ui": "1.0.0", 69 | "com.unity.modules.imgui": "1.0.0" 70 | } 71 | }, 72 | "com.unity.modules.ai": { 73 | "version": "1.0.0", 74 | "depth": 0, 75 | "source": "builtin", 76 | "dependencies": {} 77 | }, 78 | "com.unity.modules.androidjni": { 79 | "version": "1.0.0", 80 | "depth": 0, 81 | "source": "builtin", 82 | "dependencies": {} 83 | }, 84 | "com.unity.modules.animation": { 85 | "version": "1.0.0", 86 | "depth": 0, 87 | "source": "builtin", 88 | "dependencies": {} 89 | }, 90 | "com.unity.modules.assetbundle": { 91 | "version": "1.0.0", 92 | "depth": 0, 93 | "source": "builtin", 94 | "dependencies": {} 95 | }, 96 | "com.unity.modules.audio": { 97 | "version": "1.0.0", 98 | "depth": 0, 99 | "source": "builtin", 100 | "dependencies": {} 101 | }, 102 | "com.unity.modules.cloth": { 103 | "version": "1.0.0", 104 | "depth": 0, 105 | "source": "builtin", 106 | "dependencies": { 107 | "com.unity.modules.physics": "1.0.0" 108 | } 109 | }, 110 | "com.unity.modules.director": { 111 | "version": "1.0.0", 112 | "depth": 0, 113 | "source": "builtin", 114 | "dependencies": { 115 | "com.unity.modules.audio": "1.0.0", 116 | "com.unity.modules.animation": "1.0.0" 117 | } 118 | }, 119 | "com.unity.modules.imageconversion": { 120 | "version": "1.0.0", 121 | "depth": 0, 122 | "source": "builtin", 123 | "dependencies": {} 124 | }, 125 | "com.unity.modules.imgui": { 126 | "version": "1.0.0", 127 | "depth": 0, 128 | "source": "builtin", 129 | "dependencies": {} 130 | }, 131 | "com.unity.modules.jsonserialize": { 132 | "version": "1.0.0", 133 | "depth": 0, 134 | "source": "builtin", 135 | "dependencies": {} 136 | }, 137 | "com.unity.modules.particlesystem": { 138 | "version": "1.0.0", 139 | "depth": 0, 140 | "source": "builtin", 141 | "dependencies": {} 142 | }, 143 | "com.unity.modules.physics": { 144 | "version": "1.0.0", 145 | "depth": 0, 146 | "source": "builtin", 147 | "dependencies": {} 148 | }, 149 | "com.unity.modules.physics2d": { 150 | "version": "1.0.0", 151 | "depth": 0, 152 | "source": "builtin", 153 | "dependencies": {} 154 | }, 155 | "com.unity.modules.screencapture": { 156 | "version": "1.0.0", 157 | "depth": 0, 158 | "source": "builtin", 159 | "dependencies": { 160 | "com.unity.modules.imageconversion": "1.0.0" 161 | } 162 | }, 163 | "com.unity.modules.subsystems": { 164 | "version": "1.0.0", 165 | "depth": 1, 166 | "source": "builtin", 167 | "dependencies": { 168 | "com.unity.modules.jsonserialize": "1.0.0" 169 | } 170 | }, 171 | "com.unity.modules.terrain": { 172 | "version": "1.0.0", 173 | "depth": 0, 174 | "source": "builtin", 175 | "dependencies": {} 176 | }, 177 | "com.unity.modules.terrainphysics": { 178 | "version": "1.0.0", 179 | "depth": 0, 180 | "source": "builtin", 181 | "dependencies": { 182 | "com.unity.modules.physics": "1.0.0", 183 | "com.unity.modules.terrain": "1.0.0" 184 | } 185 | }, 186 | "com.unity.modules.tilemap": { 187 | "version": "1.0.0", 188 | "depth": 0, 189 | "source": "builtin", 190 | "dependencies": { 191 | "com.unity.modules.physics2d": "1.0.0" 192 | } 193 | }, 194 | "com.unity.modules.ui": { 195 | "version": "1.0.0", 196 | "depth": 0, 197 | "source": "builtin", 198 | "dependencies": {} 199 | }, 200 | "com.unity.modules.uielements": { 201 | "version": "1.0.0", 202 | "depth": 0, 203 | "source": "builtin", 204 | "dependencies": { 205 | "com.unity.modules.imgui": "1.0.0", 206 | "com.unity.modules.jsonserialize": "1.0.0" 207 | } 208 | }, 209 | "com.unity.modules.umbra": { 210 | "version": "1.0.0", 211 | "depth": 0, 212 | "source": "builtin", 213 | "dependencies": {} 214 | }, 215 | "com.unity.modules.unityanalytics": { 216 | "version": "1.0.0", 217 | "depth": 0, 218 | "source": "builtin", 219 | "dependencies": { 220 | "com.unity.modules.unitywebrequest": "1.0.0", 221 | "com.unity.modules.jsonserialize": "1.0.0" 222 | } 223 | }, 224 | "com.unity.modules.unitywebrequest": { 225 | "version": "1.0.0", 226 | "depth": 0, 227 | "source": "builtin", 228 | "dependencies": {} 229 | }, 230 | "com.unity.modules.unitywebrequestassetbundle": { 231 | "version": "1.0.0", 232 | "depth": 0, 233 | "source": "builtin", 234 | "dependencies": { 235 | "com.unity.modules.assetbundle": "1.0.0", 236 | "com.unity.modules.unitywebrequest": "1.0.0" 237 | } 238 | }, 239 | "com.unity.modules.unitywebrequestaudio": { 240 | "version": "1.0.0", 241 | "depth": 0, 242 | "source": "builtin", 243 | "dependencies": { 244 | "com.unity.modules.unitywebrequest": "1.0.0", 245 | "com.unity.modules.audio": "1.0.0" 246 | } 247 | }, 248 | "com.unity.modules.unitywebrequesttexture": { 249 | "version": "1.0.0", 250 | "depth": 0, 251 | "source": "builtin", 252 | "dependencies": { 253 | "com.unity.modules.unitywebrequest": "1.0.0", 254 | "com.unity.modules.imageconversion": "1.0.0" 255 | } 256 | }, 257 | "com.unity.modules.unitywebrequestwww": { 258 | "version": "1.0.0", 259 | "depth": 0, 260 | "source": "builtin", 261 | "dependencies": { 262 | "com.unity.modules.unitywebrequest": "1.0.0", 263 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 264 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 265 | "com.unity.modules.audio": "1.0.0", 266 | "com.unity.modules.assetbundle": "1.0.0", 267 | "com.unity.modules.imageconversion": "1.0.0" 268 | } 269 | }, 270 | "com.unity.modules.vehicles": { 271 | "version": "1.0.0", 272 | "depth": 0, 273 | "source": "builtin", 274 | "dependencies": { 275 | "com.unity.modules.physics": "1.0.0" 276 | } 277 | }, 278 | "com.unity.modules.video": { 279 | "version": "1.0.0", 280 | "depth": 0, 281 | "source": "builtin", 282 | "dependencies": { 283 | "com.unity.modules.audio": "1.0.0", 284 | "com.unity.modules.ui": "1.0.0", 285 | "com.unity.modules.unitywebrequest": "1.0.0" 286 | } 287 | }, 288 | "com.unity.modules.vr": { 289 | "version": "1.0.0", 290 | "depth": 0, 291 | "source": "builtin", 292 | "dependencies": { 293 | "com.unity.modules.jsonserialize": "1.0.0", 294 | "com.unity.modules.physics": "1.0.0", 295 | "com.unity.modules.xr": "1.0.0" 296 | } 297 | }, 298 | "com.unity.modules.wind": { 299 | "version": "1.0.0", 300 | "depth": 0, 301 | "source": "builtin", 302 | "dependencies": {} 303 | }, 304 | "com.unity.modules.xr": { 305 | "version": "1.0.0", 306 | "depth": 0, 307 | "source": "builtin", 308 | "dependencies": { 309 | "com.unity.modules.physics": "1.0.0", 310 | "com.unity.modules.jsonserialize": "1.0.0", 311 | "com.unity.modules.subsystems": "1.0.0" 312 | } 313 | } 314 | } 315 | } 316 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: 7 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: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 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 | -------------------------------------------------------------------------------- /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/Main Menu/Main Menu.unity 10 | guid: e8acf6953c51e54fa979b1af781f44de 11 | - enabled: 1 12 | path: Assets/Scenes/Balance Rod/Balance Rod.unity 13 | guid: 2cda990e2423bbf4892e6590ba056729 14 | - enabled: 1 15 | path: Assets/Scenes/Altitude Control/Altitude Control.unity 16 | guid: 7cbf8b6143ee53244bfd96a613a3eef6 17 | m_configObjects: {} 18 | -------------------------------------------------------------------------------- /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: 9 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 1 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 4 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 1 30 | m_AssetPipelineMode: 1 31 | m_CacheServerMode: 0 32 | m_CacheServerEndpoint: 33 | m_CacheServerNamespacePrefix: default 34 | m_CacheServerEnableDownload: 1 35 | m_CacheServerEnableUpload: 1 36 | -------------------------------------------------------------------------------- /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: 13 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: 10753, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} 37 | m_PreloadedShaders: [] 38 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 39 | type: 0} 40 | m_CustomRenderPipeline: {fileID: 0} 41 | m_TransparencySortMode: 0 42 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 43 | m_DefaultRenderingPath: 1 44 | m_DefaultMobileRenderingPath: 1 45 | m_TierSettings: [] 46 | m_LightmapStripping: 0 47 | m_FogStripping: 0 48 | m_InstancingStripping: 0 49 | m_LightmapKeepPlain: 1 50 | m_LightmapKeepDirCombined: 1 51 | m_LightmapKeepDynamicPlain: 1 52 | m_LightmapKeepDynamicDirCombined: 1 53 | m_LightmapKeepShadowMask: 1 54 | m_LightmapKeepSubtractive: 1 55 | m_FogKeepLinear: 1 56 | m_FogKeepExp: 1 57 | m_FogKeepExp2: 1 58 | m_AlbedoSwatchInfos: [] 59 | m_LightsUseLinearIntensity: 0 60 | m_LightsUseColorTemperature: 0 61 | m_LogWhenShaderIsCompiled: 0 62 | m_AllowEnlightenSupportForUpgradedProject: 1 63 | -------------------------------------------------------------------------------- /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: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreviewPackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | oneTimeWarningShown: 0 20 | m_Registries: 21 | - m_Id: main 22 | m_Name: 23 | m_Url: https://packages.unity.com 24 | m_Scopes: [] 25 | m_IsDefault: 1 26 | m_Capabilities: 7 27 | m_UserSelectedRegistryName: 28 | m_UserAddingNewScopedRegistry: 0 29 | m_RegistryInfoDraft: 30 | m_ErrorMessage: 31 | m_Original: 32 | m_Id: 33 | m_Name: 34 | m_Url: 35 | m_Scopes: [] 36 | m_IsDefault: 0 37 | m_Capabilities: 0 38 | m_Modified: 0 39 | m_Name: 40 | m_Url: 41 | m_Scopes: 42 | - 43 | m_SelectedScopeIndex: 0 44 | -------------------------------------------------------------------------------- /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_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: 20 7 | productGUID: 1922f652ad9c4334d9e81dae96fc6e0b 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: Atknssl 16 | productName: PID Examples 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: 0 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 | iosUseCustomAppBackgroundBehavior: 0 56 | iosAllowHTTPDownload: 1 57 | allowedAutorotateToPortrait: 1 58 | allowedAutorotateToPortraitUpsideDown: 1 59 | allowedAutorotateToLandscapeRight: 1 60 | allowedAutorotateToLandscapeLeft: 1 61 | useOSAutorotation: 1 62 | use32BitDisplayBuffer: 1 63 | preserveFramebufferAlpha: 0 64 | disableDepthAndStencilBuffers: 0 65 | androidStartInFullscreen: 1 66 | androidRenderOutsideSafeArea: 1 67 | androidUseSwappy: 0 68 | androidBlitType: 0 69 | defaultIsNativeResolution: 1 70 | macRetinaSupport: 1 71 | runInBackground: 1 72 | captureSingleScreen: 0 73 | muteOtherAudioSources: 0 74 | Prepare IOS For Recording: 0 75 | Force IOS Speakers When Recording: 0 76 | deferSystemGesturesMode: 0 77 | hideHomeButton: 0 78 | submitAnalytics: 1 79 | usePlayerLog: 1 80 | bakeCollisionMeshes: 0 81 | forceSingleInstance: 0 82 | useFlipModelSwapchain: 1 83 | resizableWindow: 0 84 | useMacAppStoreValidation: 0 85 | macAppStoreCategory: public.app-category.games 86 | gpuSkinning: 0 87 | xboxPIXTextureCapture: 0 88 | xboxEnableAvatar: 0 89 | xboxEnableKinect: 0 90 | xboxEnableKinectAutoTracking: 0 91 | xboxEnableFitness: 0 92 | visibleInBackground: 1 93 | allowFullscreenSwitch: 1 94 | fullscreenMode: 1 95 | xboxSpeechDB: 0 96 | xboxEnableHeadOrientation: 0 97 | xboxEnableGuest: 0 98 | xboxEnablePIXSampling: 0 99 | metalFramebufferOnly: 0 100 | xboxOneResolution: 0 101 | xboxOneSResolution: 0 102 | xboxOneXResolution: 3 103 | xboxOneMonoLoggingLevel: 0 104 | xboxOneLoggingLevel: 1 105 | xboxOneDisableEsram: 0 106 | xboxOneEnableTypeOptimization: 0 107 | xboxOnePresentImmediateThreshold: 0 108 | switchQueueCommandMemory: 0 109 | switchQueueControlMemory: 16384 110 | switchQueueComputeMemory: 262144 111 | switchNVNShaderPoolsGranularity: 33554432 112 | switchNVNDefaultPoolsGranularity: 16777216 113 | switchNVNOtherPoolsGranularity: 16777216 114 | switchNVNMaxPublicTextureIDCount: 0 115 | switchNVNMaxPublicSamplerIDCount: 0 116 | stadiaPresentMode: 0 117 | stadiaTargetFramerate: 0 118 | vulkanNumSwapchainBuffers: 3 119 | vulkanEnableSetSRGBWrite: 0 120 | vulkanEnableLateAcquireNextImage: 0 121 | m_SupportedAspectRatios: 122 | 4:3: 1 123 | 5:4: 1 124 | 16:10: 1 125 | 16:9: 1 126 | Others: 1 127 | bundleVersion: 0.2 128 | preloadedAssets: [] 129 | metroInputSource: 0 130 | wsaTransparentSwapchain: 0 131 | m_HolographicPauseOnTrackingLoss: 1 132 | xboxOneDisableKinectGpuReservation: 1 133 | xboxOneEnable7thCore: 1 134 | vrSettings: 135 | cardboard: 136 | depthFormat: 0 137 | enableTransitionView: 0 138 | daydream: 139 | depthFormat: 0 140 | useSustainedPerformanceMode: 0 141 | enableVideoLayer: 0 142 | useProtectedVideoMemory: 0 143 | minimumSupportedHeadTracking: 0 144 | maximumSupportedHeadTracking: 1 145 | hololens: 146 | depthFormat: 1 147 | depthBufferSharingEnabled: 1 148 | lumin: 149 | depthFormat: 0 150 | frameTiming: 2 151 | enableGLCache: 0 152 | glCacheMaxBlobSize: 524288 153 | glCacheMaxFileSize: 8388608 154 | oculus: 155 | sharedDepthBuffer: 1 156 | dashSupport: 1 157 | lowOverheadMode: 0 158 | protectedContext: 0 159 | v2Signing: 1 160 | enable360StereoCapture: 0 161 | isWsaHolographicRemotingEnabled: 0 162 | enableFrameTimingStats: 0 163 | useHDRDisplay: 0 164 | D3DHDRBitDepth: 0 165 | m_ColorGamuts: 00000000 166 | targetPixelDensity: 30 167 | resolutionScalingMode: 0 168 | androidSupportedAspectRatio: 1 169 | androidMaxAspectRatio: 2.1 170 | applicationIdentifier: 171 | Standalone: com.Company.ProductName 172 | buildNumber: {} 173 | AndroidBundleVersionCode: 1 174 | AndroidMinSdkVersion: 19 175 | AndroidTargetSdkVersion: 0 176 | AndroidPreferredInstallLocation: 1 177 | aotOptions: 178 | stripEngineCode: 1 179 | iPhoneStrippingLevel: 0 180 | iPhoneScriptCallOptimization: 0 181 | ForceInternetPermission: 0 182 | ForceSDCardPermission: 0 183 | CreateWallpaper: 0 184 | APKExpansionFiles: 0 185 | keepLoadedShadersAlive: 0 186 | StripUnusedMeshComponents: 1 187 | VertexChannelCompressionMask: 4054 188 | iPhoneSdkVersion: 988 189 | iOSTargetOSVersionString: 10.0 190 | tvOSSdkVersion: 0 191 | tvOSRequireExtendedGameController: 0 192 | tvOSTargetOSVersionString: 10.0 193 | uIPrerenderedIcon: 0 194 | uIRequiresPersistentWiFi: 0 195 | uIRequiresFullScreen: 1 196 | uIStatusBarHidden: 1 197 | uIExitOnSuspend: 0 198 | uIStatusBarStyle: 0 199 | appleTVSplashScreen: {fileID: 0} 200 | appleTVSplashScreen2x: {fileID: 0} 201 | tvOSSmallIconLayers: [] 202 | tvOSSmallIconLayers2x: [] 203 | tvOSLargeIconLayers: [] 204 | tvOSLargeIconLayers2x: [] 205 | tvOSTopShelfImageLayers: [] 206 | tvOSTopShelfImageLayers2x: [] 207 | tvOSTopShelfImageWideLayers: [] 208 | tvOSTopShelfImageWideLayers2x: [] 209 | iOSLaunchScreenType: 0 210 | iOSLaunchScreenPortrait: {fileID: 0} 211 | iOSLaunchScreenLandscape: {fileID: 0} 212 | iOSLaunchScreenBackgroundColor: 213 | serializedVersion: 2 214 | rgba: 0 215 | iOSLaunchScreenFillPct: 100 216 | iOSLaunchScreenSize: 100 217 | iOSLaunchScreenCustomXibPath: 218 | iOSLaunchScreeniPadType: 0 219 | iOSLaunchScreeniPadImage: {fileID: 0} 220 | iOSLaunchScreeniPadBackgroundColor: 221 | serializedVersion: 2 222 | rgba: 0 223 | iOSLaunchScreeniPadFillPct: 100 224 | iOSLaunchScreeniPadSize: 100 225 | iOSLaunchScreeniPadCustomXibPath: 226 | iOSUseLaunchScreenStoryboard: 0 227 | iOSLaunchScreenCustomStoryboardPath: 228 | iOSDeviceRequirements: [] 229 | iOSURLSchemes: [] 230 | iOSBackgroundModes: 0 231 | iOSMetalForceHardShadows: 0 232 | metalEditorSupport: 1 233 | metalAPIValidation: 1 234 | iOSRenderExtraFrameOnPause: 0 235 | appleDeveloperTeamID: 236 | iOSManualSigningProvisioningProfileID: 237 | tvOSManualSigningProvisioningProfileID: 238 | iOSManualSigningProvisioningProfileType: 0 239 | tvOSManualSigningProvisioningProfileType: 0 240 | appleEnableAutomaticSigning: 0 241 | iOSRequireARKit: 0 242 | iOSAutomaticallyDetectAndAddCapabilities: 1 243 | appleEnableProMotion: 0 244 | clonedFromGUID: 5f34be1353de5cf4398729fda238591b 245 | templatePackageId: com.unity.template.2d@3.2.5 246 | templateDefaultScene: Assets/Scenes/SampleScene.unity 247 | AndroidTargetArchitectures: 1 248 | AndroidSplashScreenScale: 0 249 | androidSplashScreen: {fileID: 0} 250 | AndroidKeystoreName: 251 | AndroidKeyaliasName: 252 | AndroidBuildApkPerCpuArchitecture: 0 253 | AndroidTVCompatibility: 0 254 | AndroidIsGame: 1 255 | AndroidEnableTango: 0 256 | androidEnableBanner: 1 257 | androidUseLowAccuracyLocation: 0 258 | androidUseCustomKeystore: 0 259 | m_AndroidBanners: 260 | - width: 320 261 | height: 180 262 | banner: {fileID: 0} 263 | androidGamepadSupportLevel: 0 264 | AndroidValidateAppBundleSize: 1 265 | AndroidAppBundleSizeToValidate: 150 266 | m_BuildTargetIcons: [] 267 | m_BuildTargetPlatformIcons: [] 268 | m_BuildTargetBatching: [] 269 | m_BuildTargetGraphicsJobs: 270 | - m_BuildTarget: MacStandaloneSupport 271 | m_GraphicsJobs: 0 272 | - m_BuildTarget: Switch 273 | m_GraphicsJobs: 0 274 | - m_BuildTarget: MetroSupport 275 | m_GraphicsJobs: 0 276 | - m_BuildTarget: AppleTVSupport 277 | m_GraphicsJobs: 0 278 | - m_BuildTarget: BJMSupport 279 | m_GraphicsJobs: 0 280 | - m_BuildTarget: LinuxStandaloneSupport 281 | m_GraphicsJobs: 0 282 | - m_BuildTarget: PS4Player 283 | m_GraphicsJobs: 0 284 | - m_BuildTarget: iOSSupport 285 | m_GraphicsJobs: 0 286 | - m_BuildTarget: WindowsStandaloneSupport 287 | m_GraphicsJobs: 0 288 | - m_BuildTarget: XboxOnePlayer 289 | m_GraphicsJobs: 0 290 | - m_BuildTarget: LuminSupport 291 | m_GraphicsJobs: 0 292 | - m_BuildTarget: AndroidPlayer 293 | m_GraphicsJobs: 0 294 | - m_BuildTarget: WebGLSupport 295 | m_GraphicsJobs: 0 296 | m_BuildTargetGraphicsJobMode: 297 | - m_BuildTarget: PS4Player 298 | m_GraphicsJobMode: 0 299 | - m_BuildTarget: XboxOnePlayer 300 | m_GraphicsJobMode: 0 301 | m_BuildTargetGraphicsAPIs: 302 | - m_BuildTarget: AndroidPlayer 303 | m_APIs: 150000000b000000 304 | m_Automatic: 0 305 | m_BuildTargetVRSettings: [] 306 | openGLRequireES31: 0 307 | openGLRequireES31AEP: 0 308 | openGLRequireES32: 0 309 | m_TemplateCustomTags: {} 310 | mobileMTRendering: 311 | Android: 1 312 | iPhone: 1 313 | tvOS: 1 314 | m_BuildTargetGroupLightmapEncodingQuality: [] 315 | m_BuildTargetGroupLightmapSettings: [] 316 | playModeTestRunnerEnabled: 0 317 | runPlayModeTestAsEditModeTest: 0 318 | actionOnDotNetUnhandledException: 1 319 | enableInternalProfiler: 0 320 | logObjCUncaughtExceptions: 1 321 | enableCrashReportAPI: 0 322 | cameraUsageDescription: 323 | locationUsageDescription: 324 | microphoneUsageDescription: 325 | switchNetLibKey: 326 | switchSocketMemoryPoolSize: 6144 327 | switchSocketAllocatorPoolSize: 128 328 | switchSocketConcurrencyLimit: 14 329 | switchScreenResolutionBehavior: 2 330 | switchUseCPUProfiler: 0 331 | switchApplicationID: 0x01004b9000490000 332 | switchNSODependencies: 333 | switchTitleNames_0: 334 | switchTitleNames_1: 335 | switchTitleNames_2: 336 | switchTitleNames_3: 337 | switchTitleNames_4: 338 | switchTitleNames_5: 339 | switchTitleNames_6: 340 | switchTitleNames_7: 341 | switchTitleNames_8: 342 | switchTitleNames_9: 343 | switchTitleNames_10: 344 | switchTitleNames_11: 345 | switchTitleNames_12: 346 | switchTitleNames_13: 347 | switchTitleNames_14: 348 | switchPublisherNames_0: 349 | switchPublisherNames_1: 350 | switchPublisherNames_2: 351 | switchPublisherNames_3: 352 | switchPublisherNames_4: 353 | switchPublisherNames_5: 354 | switchPublisherNames_6: 355 | switchPublisherNames_7: 356 | switchPublisherNames_8: 357 | switchPublisherNames_9: 358 | switchPublisherNames_10: 359 | switchPublisherNames_11: 360 | switchPublisherNames_12: 361 | switchPublisherNames_13: 362 | switchPublisherNames_14: 363 | switchIcons_0: {fileID: 0} 364 | switchIcons_1: {fileID: 0} 365 | switchIcons_2: {fileID: 0} 366 | switchIcons_3: {fileID: 0} 367 | switchIcons_4: {fileID: 0} 368 | switchIcons_5: {fileID: 0} 369 | switchIcons_6: {fileID: 0} 370 | switchIcons_7: {fileID: 0} 371 | switchIcons_8: {fileID: 0} 372 | switchIcons_9: {fileID: 0} 373 | switchIcons_10: {fileID: 0} 374 | switchIcons_11: {fileID: 0} 375 | switchIcons_12: {fileID: 0} 376 | switchIcons_13: {fileID: 0} 377 | switchIcons_14: {fileID: 0} 378 | switchSmallIcons_0: {fileID: 0} 379 | switchSmallIcons_1: {fileID: 0} 380 | switchSmallIcons_2: {fileID: 0} 381 | switchSmallIcons_3: {fileID: 0} 382 | switchSmallIcons_4: {fileID: 0} 383 | switchSmallIcons_5: {fileID: 0} 384 | switchSmallIcons_6: {fileID: 0} 385 | switchSmallIcons_7: {fileID: 0} 386 | switchSmallIcons_8: {fileID: 0} 387 | switchSmallIcons_9: {fileID: 0} 388 | switchSmallIcons_10: {fileID: 0} 389 | switchSmallIcons_11: {fileID: 0} 390 | switchSmallIcons_12: {fileID: 0} 391 | switchSmallIcons_13: {fileID: 0} 392 | switchSmallIcons_14: {fileID: 0} 393 | switchManualHTML: 394 | switchAccessibleURLs: 395 | switchLegalInformation: 396 | switchMainThreadStackSize: 1048576 397 | switchPresenceGroupId: 398 | switchLogoHandling: 0 399 | switchReleaseVersion: 0 400 | switchDisplayVersion: 1.0.0 401 | switchStartupUserAccount: 0 402 | switchTouchScreenUsage: 0 403 | switchSupportedLanguagesMask: 0 404 | switchLogoType: 0 405 | switchApplicationErrorCodeCategory: 406 | switchUserAccountSaveDataSize: 0 407 | switchUserAccountSaveDataJournalSize: 0 408 | switchApplicationAttribute: 0 409 | switchCardSpecSize: -1 410 | switchCardSpecClock: -1 411 | switchRatingsMask: 0 412 | switchRatingsInt_0: 0 413 | switchRatingsInt_1: 0 414 | switchRatingsInt_2: 0 415 | switchRatingsInt_3: 0 416 | switchRatingsInt_4: 0 417 | switchRatingsInt_5: 0 418 | switchRatingsInt_6: 0 419 | switchRatingsInt_7: 0 420 | switchRatingsInt_8: 0 421 | switchRatingsInt_9: 0 422 | switchRatingsInt_10: 0 423 | switchRatingsInt_11: 0 424 | switchRatingsInt_12: 0 425 | switchLocalCommunicationIds_0: 426 | switchLocalCommunicationIds_1: 427 | switchLocalCommunicationIds_2: 428 | switchLocalCommunicationIds_3: 429 | switchLocalCommunicationIds_4: 430 | switchLocalCommunicationIds_5: 431 | switchLocalCommunicationIds_6: 432 | switchLocalCommunicationIds_7: 433 | switchParentalControl: 0 434 | switchAllowsScreenshot: 1 435 | switchAllowsVideoCapturing: 1 436 | switchAllowsRuntimeAddOnContentInstall: 0 437 | switchDataLossConfirmation: 0 438 | switchUserAccountLockEnabled: 0 439 | switchSystemResourceMemory: 16777216 440 | switchSupportedNpadStyles: 22 441 | switchNativeFsCacheSize: 32 442 | switchIsHoldTypeHorizontal: 0 443 | switchSupportedNpadCount: 8 444 | switchSocketConfigEnabled: 0 445 | switchTcpInitialSendBufferSize: 32 446 | switchTcpInitialReceiveBufferSize: 64 447 | switchTcpAutoSendBufferSizeMax: 256 448 | switchTcpAutoReceiveBufferSizeMax: 256 449 | switchUdpSendBufferSize: 9 450 | switchUdpReceiveBufferSize: 42 451 | switchSocketBufferEfficiency: 4 452 | switchSocketInitializeEnabled: 1 453 | switchNetworkInterfaceManagerInitializeEnabled: 1 454 | switchPlayerConnectionEnabled: 1 455 | ps4NPAgeRating: 12 456 | ps4NPTitleSecret: 457 | ps4NPTrophyPackPath: 458 | ps4ParentalLevel: 11 459 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 460 | ps4Category: 0 461 | ps4MasterVersion: 01.00 462 | ps4AppVersion: 01.00 463 | ps4AppType: 0 464 | ps4ParamSfxPath: 465 | ps4VideoOutPixelFormat: 0 466 | ps4VideoOutInitialWidth: 1920 467 | ps4VideoOutBaseModeInitialWidth: 1920 468 | ps4VideoOutReprojectionRate: 60 469 | ps4PronunciationXMLPath: 470 | ps4PronunciationSIGPath: 471 | ps4BackgroundImagePath: 472 | ps4StartupImagePath: 473 | ps4StartupImagesFolder: 474 | ps4IconImagesFolder: 475 | ps4SaveDataImagePath: 476 | ps4SdkOverride: 477 | ps4BGMPath: 478 | ps4ShareFilePath: 479 | ps4ShareOverlayImagePath: 480 | ps4PrivacyGuardImagePath: 481 | ps4ExtraSceSysFile: 482 | ps4NPtitleDatPath: 483 | ps4RemotePlayKeyAssignment: -1 484 | ps4RemotePlayKeyMappingDir: 485 | ps4PlayTogetherPlayerCount: 0 486 | ps4EnterButtonAssignment: 1 487 | ps4ApplicationParam1: 0 488 | ps4ApplicationParam2: 0 489 | ps4ApplicationParam3: 0 490 | ps4ApplicationParam4: 0 491 | ps4DownloadDataSize: 0 492 | ps4GarlicHeapSize: 2048 493 | ps4ProGarlicHeapSize: 2560 494 | playerPrefsMaxSize: 32768 495 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 496 | ps4pnSessions: 1 497 | ps4pnPresence: 1 498 | ps4pnFriends: 1 499 | ps4pnGameCustomData: 1 500 | playerPrefsSupport: 0 501 | enableApplicationExit: 0 502 | resetTempFolder: 1 503 | restrictedAudioUsageRights: 0 504 | ps4UseResolutionFallback: 0 505 | ps4ReprojectionSupport: 0 506 | ps4UseAudio3dBackend: 0 507 | ps4UseLowGarlicFragmentationMode: 1 508 | ps4SocialScreenEnabled: 0 509 | ps4ScriptOptimizationLevel: 0 510 | ps4Audio3dVirtualSpeakerCount: 14 511 | ps4attribCpuUsage: 0 512 | ps4PatchPkgPath: 513 | ps4PatchLatestPkgPath: 514 | ps4PatchChangeinfoPath: 515 | ps4PatchDayOne: 0 516 | ps4attribUserManagement: 0 517 | ps4attribMoveSupport: 0 518 | ps4attrib3DSupport: 0 519 | ps4attribShareSupport: 0 520 | ps4attribExclusiveVR: 0 521 | ps4disableAutoHideSplash: 0 522 | ps4videoRecordingFeaturesUsed: 0 523 | ps4contentSearchFeaturesUsed: 0 524 | ps4CompatibilityPS5: 0 525 | ps4GPU800MHz: 1 526 | ps4attribEyeToEyeDistanceSettingVR: 0 527 | ps4IncludedModules: [] 528 | ps4attribVROutputEnabled: 0 529 | monoEnv: 530 | splashScreenBackgroundSourceLandscape: {fileID: 0} 531 | splashScreenBackgroundSourcePortrait: {fileID: 0} 532 | blurSplashScreenBackground: 1 533 | spritePackerPolicy: 534 | webGLMemorySize: 16 535 | webGLExceptionSupport: 1 536 | webGLNameFilesAsHashes: 0 537 | webGLDataCaching: 1 538 | webGLDebugSymbols: 0 539 | webGLEmscriptenArgs: 540 | webGLModulesDirectory: 541 | webGLTemplate: APPLICATION:Default 542 | webGLAnalyzeBuildSize: 0 543 | webGLUseEmbeddedResources: 0 544 | webGLCompressionFormat: 1 545 | webGLLinkerTarget: 1 546 | webGLThreadsSupport: 0 547 | webGLWasmStreaming: 0 548 | scriptingDefineSymbols: {} 549 | platformArchitecture: {} 550 | scriptingBackend: {} 551 | il2cppCompilerConfiguration: {} 552 | managedStrippingLevel: {} 553 | incrementalIl2cppBuild: {} 554 | allowUnsafeCode: 0 555 | additionalIl2CppArgs: 556 | scriptingRuntimeVersion: 1 557 | gcIncremental: 0 558 | gcWBarrierValidation: 0 559 | apiCompatibilityLevelPerPlatform: {} 560 | m_RenderingPath: 1 561 | m_MobileRenderingPath: 1 562 | metroPackageName: Template_2D 563 | metroPackageVersion: 564 | metroCertificatePath: 565 | metroCertificatePassword: 566 | metroCertificateSubject: 567 | metroCertificateIssuer: 568 | metroCertificateNotAfter: 0000000000000000 569 | metroApplicationDescription: Template_2D 570 | wsaImages: {} 571 | metroTileShortName: 572 | metroTileShowName: 0 573 | metroMediumTileShowName: 0 574 | metroLargeTileShowName: 0 575 | metroWideTileShowName: 0 576 | metroSupportStreamingInstall: 0 577 | metroLastRequiredScene: 0 578 | metroDefaultTileSize: 1 579 | metroTileForegroundText: 2 580 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 581 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 582 | a: 1} 583 | metroSplashScreenUseBackgroundColor: 0 584 | platformCapabilities: {} 585 | metroTargetDeviceFamilies: {} 586 | metroFTAName: 587 | metroFTAFileTypes: [] 588 | metroProtocolName: 589 | XboxOneProductId: 590 | XboxOneUpdateKey: 591 | XboxOneSandboxId: 592 | XboxOneContentId: 593 | XboxOneTitleId: 594 | XboxOneSCId: 595 | XboxOneGameOsOverridePath: 596 | XboxOnePackagingOverridePath: 597 | XboxOneAppManifestOverridePath: 598 | XboxOneVersion: 1.0.0.0 599 | XboxOnePackageEncryption: 0 600 | XboxOnePackageUpdateGranularity: 2 601 | XboxOneDescription: 602 | XboxOneLanguage: 603 | - enus 604 | XboxOneCapability: [] 605 | XboxOneGameRating: {} 606 | XboxOneIsContentPackage: 0 607 | XboxOneEnableGPUVariability: 1 608 | XboxOneSockets: {} 609 | XboxOneSplashScreen: {fileID: 0} 610 | XboxOneAllowedProductIds: [] 611 | XboxOnePersistentLocalStorageSize: 0 612 | XboxOneXTitleMemory: 8 613 | XboxOneOverrideIdentityName: 614 | XboxOneOverrideIdentityPublisher: 615 | vrEditorSettings: 616 | daydream: 617 | daydreamIconForeground: {fileID: 0} 618 | daydreamIconBackground: {fileID: 0} 619 | cloudServicesEnabled: 620 | UNet: 1 621 | luminIcon: 622 | m_Name: 623 | m_ModelFolderPath: 624 | m_PortalFolderPath: 625 | luminCert: 626 | m_CertPath: 627 | m_SignPackage: 1 628 | luminIsChannelApp: 0 629 | luminVersion: 630 | m_VersionCode: 1 631 | m_VersionName: 632 | apiCompatibilityLevel: 6 633 | cloudProjectId: 634 | framebufferDepthMemorylessMode: 0 635 | projectName: 636 | organizationId: 637 | cloudEnabled: 0 638 | enableNativePlatformBackendsForNewInputSystem: 0 639 | disableOldInputManagerSupport: 0 640 | legacyClampBlendShapeWeights: 0 641 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2019.4.9f1 2 | m_EditorVersionWithRevision: 2019.4.9f1 (50fe8a171dd9) 3 | -------------------------------------------------------------------------------- /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: 3 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 | particleRaycastBudget: 4 33 | asyncUploadTimeSlice: 2 34 | asyncUploadBufferSize: 16 35 | resolutionScalingFixedDPIFactor: 1 36 | excludedTargetPlatforms: [] 37 | - serializedVersion: 2 38 | name: Low 39 | pixelLightCount: 0 40 | shadows: 0 41 | shadowResolution: 0 42 | shadowProjection: 1 43 | shadowCascades: 1 44 | shadowDistance: 20 45 | shadowNearPlaneOffset: 3 46 | shadowCascade2Split: 0.33333334 47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 48 | shadowmaskMode: 0 49 | blendWeights: 2 50 | textureQuality: 0 51 | anisotropicTextures: 0 52 | antiAliasing: 0 53 | softParticles: 0 54 | softVegetation: 0 55 | realtimeReflectionProbes: 0 56 | billboardsFaceCameraPosition: 0 57 | vSyncCount: 0 58 | lodBias: 0.4 59 | maximumLODLevel: 0 60 | particleRaycastBudget: 16 61 | asyncUploadTimeSlice: 2 62 | asyncUploadBufferSize: 16 63 | resolutionScalingFixedDPIFactor: 1 64 | excludedTargetPlatforms: [] 65 | - serializedVersion: 2 66 | name: Medium 67 | pixelLightCount: 1 68 | shadows: 0 69 | shadowResolution: 0 70 | shadowProjection: 1 71 | shadowCascades: 1 72 | shadowDistance: 20 73 | shadowNearPlaneOffset: 3 74 | shadowCascade2Split: 0.33333334 75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 76 | shadowmaskMode: 0 77 | blendWeights: 2 78 | textureQuality: 0 79 | anisotropicTextures: 0 80 | antiAliasing: 0 81 | softParticles: 0 82 | softVegetation: 0 83 | realtimeReflectionProbes: 0 84 | billboardsFaceCameraPosition: 0 85 | vSyncCount: 1 86 | lodBias: 0.7 87 | maximumLODLevel: 0 88 | particleRaycastBudget: 64 89 | asyncUploadTimeSlice: 2 90 | asyncUploadBufferSize: 16 91 | resolutionScalingFixedDPIFactor: 1 92 | excludedTargetPlatforms: [] 93 | - serializedVersion: 2 94 | name: High 95 | pixelLightCount: 2 96 | shadows: 0 97 | shadowResolution: 1 98 | shadowProjection: 1 99 | shadowCascades: 2 100 | shadowDistance: 40 101 | shadowNearPlaneOffset: 3 102 | shadowCascade2Split: 0.33333334 103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 104 | shadowmaskMode: 1 105 | blendWeights: 2 106 | textureQuality: 0 107 | anisotropicTextures: 0 108 | antiAliasing: 0 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 0 112 | billboardsFaceCameraPosition: 0 113 | vSyncCount: 1 114 | lodBias: 1 115 | maximumLODLevel: 0 116 | particleRaycastBudget: 256 117 | asyncUploadTimeSlice: 2 118 | asyncUploadBufferSize: 16 119 | resolutionScalingFixedDPIFactor: 1 120 | excludedTargetPlatforms: [] 121 | - serializedVersion: 2 122 | name: Very High 123 | pixelLightCount: 3 124 | shadows: 0 125 | shadowResolution: 2 126 | shadowProjection: 1 127 | shadowCascades: 2 128 | shadowDistance: 70 129 | shadowNearPlaneOffset: 3 130 | shadowCascade2Split: 0.33333334 131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 132 | shadowmaskMode: 1 133 | blendWeights: 4 134 | textureQuality: 0 135 | anisotropicTextures: 0 136 | antiAliasing: 0 137 | softParticles: 0 138 | softVegetation: 1 139 | realtimeReflectionProbes: 0 140 | billboardsFaceCameraPosition: 0 141 | vSyncCount: 1 142 | lodBias: 1.5 143 | maximumLODLevel: 0 144 | particleRaycastBudget: 1024 145 | asyncUploadTimeSlice: 2 146 | asyncUploadBufferSize: 16 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Ultra 151 | pixelLightCount: 4 152 | shadows: 0 153 | shadowResolution: 0 154 | shadowProjection: 1 155 | shadowCascades: 4 156 | shadowDistance: 150 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: 0 164 | antiAliasing: 0 165 | softParticles: 0 166 | softVegetation: 1 167 | realtimeReflectionProbes: 0 168 | billboardsFaceCameraPosition: 0 169 | vSyncCount: 1 170 | lodBias: 2 171 | maximumLODLevel: 0 172 | particleRaycastBudget: 4096 173 | asyncUploadTimeSlice: 2 174 | asyncUploadBufferSize: 16 175 | resolutionScalingFixedDPIFactor: 1 176 | excludedTargetPlatforms: [] 177 | m_PerPlatformDefaultQuality: 178 | Android: 2 179 | Nintendo 3DS: 5 180 | Nintendo Switch: 5 181 | PS4: 5 182 | PSM: 5 183 | PSP2: 2 184 | Stadia: 5 185 | Standalone: 5 186 | Tizen: 2 187 | WebGL: 3 188 | WiiU: 5 189 | Windows Store Apps: 5 190 | XboxOne: 5 191 | iPhone: 2 192 | tvOS: 2 193 | -------------------------------------------------------------------------------- /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 | - Propeller 8 | layers: 9 | - Default 10 | - TransparentFX 11 | - Ignore Raycast 12 | - 13 | - Water 14 | - UI 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | - 41 | m_SortingLayers: 42 | - name: Default 43 | uniqueID: 0 44 | locked: 0 45 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: 0 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: 0 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 | -------------------------------------------------------------------------------- /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_RenderPipeSettingsPath: 8 | -------------------------------------------------------------------------------- /ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 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 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Unity-PID-Examples 2 | 3 | There are some basic examples that may help you to understand PID logic. 4 | Currently there are 2 examples: 5 | 6 | ## Balance Rod 7 | ![BalanceRod](https://user-images.githubusercontent.com/40236955/106948157-68454180-673c-11eb-8f9e-be0c2f881709.jpg) 8 | In this example, there are two motors connected to a rod which can rotate around its center. PID controller on rod controls the system. Motors balance the rod at a desired angle, which can be changed from controller. 9 | 10 | This is actually PD controller by default, as there is no difference between motor power or loading, therefore I is not needed. 11 | 12 | One can spawn weight balls to change loading, which would change the angle. After the ball leaves rod, rod will balance itself to desired angle. Balls have a default lifespan of 10s which can be changed from editor. 13 | 14 | As there is no I factor at default settings, the rod won't be able to balance itself exactly to the desired angle while balls are applying load. In order to change this, one must change the I factor from the controller to a positive value. With I factor addition, rod can also balance itself if motor powers are different. 15 | 16 | ## Altitude Control 17 | ![AltitudeControl](https://user-images.githubusercontent.com/40236955/106948144-65e2e780-673c-11eb-90ed-a48efb64d418.jpg) 18 | Demonstration video: [Youtube](https://youtu.be/p721Ur-T_SY) 19 | 20 | In this example, there are two motors connected to a rod which is free to move on y axis. PID controller on rod controls the system. Motors try to hold desired altitude, which can be changed from controller. 21 | 22 | Rod kept overshooting because of high velocity, so a speed limiter is implemented while rod ascends and descends. Maximum ascend and descend speed can be changed from editor. 23 | 24 | To prevent [integral windup](https://en.wikipedia.org/wiki/Integral_windup) while changing altitude, maximum value of integral is limited. 25 | 26 | Altitude lines will show until altitude of 100 meters, this can be changed from editor. 27 | 28 | Current PID gains are choosen for altitude changes greater than 10m. For lower altitude changes, response will be slower. For example, with current gains, altitude change from 0 to 50m is quick and responsive, whereas altitude change from 0 to 5m is slow. To get better performance at small altitude changes, PID gains should be changed. 29 | 30 | # Other Settings 31 | 32 | ## Motors 33 | Maximum force motor can create can be changed from motor script on each motor. Default value is 30N. 34 | ## Balls 35 | Mass of balls can be changed from Ball prefab. Default value is 1kg. 36 | -------------------------------------------------------------------------------- /UserSettings/EditorUserSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!162 &1 4 | EditorUserSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_ConfigSettings: 8 | vcSharedLogLevel: 9 | value: 0d5e400f0650 10 | flags: 0 11 | m_VCAutomaticAdd: 1 12 | m_VCDebugCom: 0 13 | m_VCDebugCmd: 0 14 | m_VCDebugOut: 0 15 | m_SemanticMergeMode: 2 16 | m_VCShowFailedCheckout: 1 17 | m_VCOverwriteFailedCheckoutAssets: 1 18 | m_VCOverlayIcons: 1 19 | m_VCAllowAsyncUpdate: 0 20 | --------------------------------------------------------------------------------