diff --git a/Assets/AirplanePhysics/Code/Scripts/Engines/AirplaneEngine.cs b/Assets/AirplanePhysics/Code/Scripts/Engines/AirplaneEngine.cs index 2c4ed61..404a4df 100644 --- a/Assets/AirplanePhysics/Code/Scripts/Engines/AirplaneEngine.cs +++ b/Assets/AirplanePhysics/Code/Scripts/Engines/AirplaneEngine.cs @@ -17,7 +17,7 @@ public class AirplaneEngine : MonoBehaviour { private bool isShutOff; private float lastThrottle; - private float finalShutoffThrollte; + private float finalShutoffThrottle; private AirplaneFuel fuel; #endregion @@ -57,8 +57,8 @@ public Vector3 CalculateForce(float throttle) { else { lastThrottle -= Time.deltaTime * shutOffSpeed; lastThrottle = Mathf.Clamp01(lastThrottle); - finalShutoffThrollte = powerCurve.Evaluate(lastThrottle); - finalThrottle = finalShutoffThrollte; + finalShutoffThrottle = powerCurve.Evaluate(lastThrottle); + finalThrottle = finalShutoffThrottle; } currentRPM = finalThrottle * maxRPM; diff --git a/Assets/AirplanePhysics/Code/Scripts/Input/BaseAirplaneInput.cs b/Assets/AirplanePhysics/Code/Scripts/Input/BaseAirplaneInput.cs index d0f401e..ae72d23 100644 --- a/Assets/AirplanePhysics/Code/Scripts/Input/BaseAirplaneInput.cs +++ b/Assets/AirplanePhysics/Code/Scripts/Input/BaseAirplaneInput.cs @@ -88,7 +88,7 @@ protected virtual void HandleInput() { protected void HandleStickyThrottle() { - stickyThrottle += - throttle * throttleSpeed * Time.deltaTime; + stickyThrottle += throttle * throttleSpeed * Time.deltaTime; stickyThrottle = Mathf.Clamp01(stickyThrottle); } diff --git a/Assets/AirplanePhysics/Scenes/Airplane_Setup_Dev.unity b/Assets/AirplanePhysics/Scenes/Airplane_Setup_Dev.unity index e293b51..2aa2526 100644 --- a/Assets/AirplanePhysics/Scenes/Airplane_Setup_Dev.unity +++ b/Assets/AirplanePhysics/Scenes/Airplane_Setup_Dev.unity @@ -585,7 +585,7 @@ CapsuleCollider: m_IsTrigger: 0 m_Enabled: 1 m_Radius: 0.5 - m_Height: 3 + m_Height: 4 m_Direction: 2 m_Center: {x: 0, y: 0, z: 0} --- !u!1 &138547970 @@ -638,7 +638,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-568236 + m_Name: pb_Mesh-5676 serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 @@ -814,7 +814,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &217038224 RectTransform: m_ObjectHideFlags: 0 @@ -826,8 +826,8 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0} m_Children: - - {fileID: 1340767857} - {fileID: 1735459715} + - {fileID: 1340767857} m_Father: {fileID: 260429990} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -1505,9 +1505,9 @@ RectTransform: m_Father: {fileID: 1091299070} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 1920, y: -50} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 640, y: 100} m_Pivot: {x: 1, y: 0.5} --- !u!1 &362657632 @@ -3877,7 +3877,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-569742 + m_Name: pb_Mesh-5714 serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 @@ -4168,7 +4168,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-572760 + m_Name: pb_Mesh-5752 serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 @@ -4432,9 +4432,9 @@ RectTransform: m_Father: {fileID: 1091299070} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 960, y: -50} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 640, y: 100} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &1226525904 @@ -4519,7 +4519,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &1279860018 Transform: m_ObjectHideFlags: 0 @@ -4897,7 +4897,7 @@ RectTransform: - {fileID: 537106708} - {fileID: 1671684221} m_Father: {fileID: 217038224} - m_RootOrder: 0 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} @@ -5153,13 +5153,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1437127569} - m_LocalRotation: {x: 0.17364816, y: 0, z: 0, w: 0.9848078} - m_LocalPosition: {x: 0, y: 0.25, z: -2} + m_LocalRotation: {x: 0.043619405, y: 0, z: 0, w: 0.9990483} + m_LocalPosition: {x: 0, y: 0.1, z: -2.23} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 532661841} m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 20, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 5, y: 0, z: 0} --- !u!136 &1437127571 CapsuleCollider: m_ObjectHideFlags: 0 @@ -5171,7 +5171,7 @@ CapsuleCollider: m_IsTrigger: 0 m_Enabled: 1 m_Radius: 0.45 - m_Height: 2.5 + m_Height: 2 m_Direction: 2 m_Center: {x: 0, y: 0, z: 0.3} --- !u!1 &1463665162 @@ -5662,7 +5662,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &1581266170 RectTransform: m_ObjectHideFlags: 0 @@ -6097,7 +6097,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &1671684221 RectTransform: m_ObjectHideFlags: 0 @@ -6267,7 +6267,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-499442 + m_Name: pb_Mesh-5790 serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 @@ -6587,7 +6587,7 @@ RectTransform: - {fileID: 1632614223} - {fileID: 1091299070} m_Father: {fileID: 217038224} - m_RootOrder: 1 + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} @@ -7371,7 +7371,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1911896709} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: -0.5, z: 0.8} + m_LocalPosition: {x: 0, y: -0.6, z: 0.45} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2124795053} @@ -7683,9 +7683,9 @@ RectTransform: m_Father: {fileID: 1091299070} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -50} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 640, y: 100} m_Pivot: {x: 0, y: 0.5} --- !u!1 &2124795052 @@ -7700,6 +7700,7 @@ GameObject: - component: {fileID: 2124795054} - component: {fileID: 2124795057} - component: {fileID: 2124795056} + - component: {fileID: 2124795062} - component: {fileID: 2124795061} - component: {fileID: 2124795058} - component: {fileID: 2124795055} @@ -7719,8 +7720,8 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2124795052} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1.58, z: 0} + m_LocalRotation: {x: -0.14780933, y: 0, z: 0, w: 0.9890159} + m_LocalPosition: {x: 0, y: 1.3, z: -495} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1093245661} @@ -7733,7 +7734,7 @@ Transform: - {fileID: 1292016108} m_Father: {fileID: 0} m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: -17, y: 0, z: 0} --- !u!54 &2124795054 Rigidbody: m_ObjectHideFlags: 0 @@ -7791,7 +7792,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2124795052} - m_Enabled: 0 + m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 7cedf7d1ed46ce5439f44f4e1522f5d8, type: 3} m_Name: @@ -7912,7 +7913,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: maxMPH: 110 - rbLerpSpeed: 1 + rbLerpSpeed: 0.04 maxLiftPower: 3000 liftCurve: serializedVersion: 2 @@ -7920,21 +7921,12 @@ MonoBehaviour: - serializedVersion: 3 time: 0 value: 0 - inSlope: 2 - outSlope: 2 + inSlope: 0 + outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0 outWeight: 0 - - serializedVersion: 3 - time: 0.14140618 - value: 0.75793725 - inSlope: 1.0016086 - outSlope: 1.0016086 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - serializedVersion: 3 time: 1 value: 1 @@ -7948,8 +7940,8 @@ MonoBehaviour: m_PostInfinity: 2 m_RotationOrder: 4 flapLiftPower: 100 - dragFactor: 0.0001 - flapDragFactor: 0.1 + dragFactor: 0.0004 + flapDragFactor: 0.0003 pitchSpeed: 1500 rollSpeed: 1550 yawSpeed: 1500 @@ -8013,7 +8005,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2124795052} - m_Enabled: 1 + m_Enabled: 0 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 7718d34474b9a8146a199f0c6639ae8d, type: 3} m_Name: @@ -8027,6 +8019,25 @@ MonoBehaviour: rFlap: 103 lThumbstick: {fileID: 17489682} rThumbstick: {fileID: 1576433614} +--- !u!114 &2124795062 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2124795052} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: df4e6d7b56356df46860e325e5ddec34, type: 3} + m_Name: + m_EditorClassIdentifier: + maxFlapIncrements: 2 + minFlaps: 0 + maxFlaps: 3 + cameraKey: 99 + brakeKey: 32 + lFlap: 102 + rFlap: 103 --- !u!1 &2129624026 GameObject: m_ObjectHideFlags: 0