diff --git a/BottomGear/Assets/Game/Scenes/GameScene.unity b/BottomGear/Assets/Game/Scenes/GameScene.unity index 0b4fbcf1..a62bc405 100644 --- a/BottomGear/Assets/Game/Scenes/GameScene.unity +++ b/BottomGear/Assets/Game/Scenes/GameScene.unity @@ -195,7 +195,7 @@ Light: m_Type: 1 m_Shape: 0 m_Color: {r: 1, g: 1, b: 1, a: 1} - m_Intensity: 0.75 + m_Intensity: 2 m_Range: 10 m_SpotAngle: 30 m_InnerSpotAngle: 21.80208 @@ -377,13 +377,109 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 523789977} - m_LocalRotation: {x: 0.41102695, y: -0, z: -0, w: 0.91162324} - m_LocalPosition: {x: 0, y: 70.7, z: -74.5} + m_LocalRotation: {x: 0.28135476, y: -0, z: -0, w: 0.95960385} + m_LocalPosition: {x: 0, y: 193.8, z: -377.8} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 48.539, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 32.682, y: 0, z: 0} +--- !u!1 &593042560 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 593042564} + - component: {fileID: 593042563} + - component: {fileID: 593042562} + - component: {fileID: 593042561} + m_Layer: 0 + m_Name: Capsule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!136 &593042561 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 593042560} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &593042562 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 593042560} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 7b7128dc8984e21449e952bf79f240f4, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &593042563 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 593042560} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &593042564 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 593042560} + m_LocalRotation: {x: 0, y: 0, z: -0.7071068, w: 0.7071068} + m_LocalPosition: {x: -11, y: -21, z: 141} + m_LocalScale: {x: 1000, y: 750, z: 1000} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: -90} --- !u!1 &601629550 GameObject: m_ObjectHideFlags: 0 @@ -536,6 +632,82 @@ MonoBehaviour: m_EditorClassIdentifier: Countdown: 5 Text: {fileID: 601629552} +--- !u!1 &1063431883 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1063431886} + - component: {fileID: 1063431885} + - component: {fileID: 1063431884} + m_Layer: 0 + m_Name: Terrain + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 4294967295 + m_IsActive: 1 +--- !u!154 &1063431884 +TerrainCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1063431883} + m_Material: {fileID: 0} + m_Enabled: 1 + m_TerrainData: {fileID: 15600000, guid: 4c5139cf80b8fde46b394d866571370d, type: 2} + m_EnableTreeColliders: 1 +--- !u!218 &1063431885 +Terrain: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1063431883} + m_Enabled: 1 + serializedVersion: 6 + m_TerrainData: {fileID: 15600000, guid: 4c5139cf80b8fde46b394d866571370d, type: 2} + m_TreeDistance: 5000 + m_TreeBillboardDistance: 50 + m_TreeCrossFadeLength: 5 + m_TreeMaximumFullLODCount: 50 + m_DetailObjectDistance: 80 + m_DetailObjectDensity: 1 + m_HeightmapPixelError: 5 + m_SplatMapDistance: 1000 + m_HeightmapMaximumLOD: 0 + m_ShadowCastingMode: 2 + m_DrawHeightmap: 1 + m_DrawInstanced: 0 + m_DrawTreesAndFoliage: 1 + m_ReflectionProbeUsage: 1 + m_MaterialTemplate: {fileID: 2100000, guid: 594ea882c5a793440b60ff72d896021e, type: 2} + m_BakeLightProbesForTrees: 1 + m_PreserveTreePrototypeLayers: 0 + m_DeringLightProbesForTrees: 1 + m_ScaleInLightmap: 0.0256 + m_LightmapParameters: {fileID: 15203, guid: 0000000000000000f000000000000000, type: 0} + m_GroupingID: 0 + m_RenderingLayerMask: 1 + m_AllowAutoConnect: 1 +--- !u!4 &1063431886 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1063431883} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -761, y: -21, z: -359} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1308668355 GameObject: m_ObjectHideFlags: 0 @@ -554,7 +726,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!64 &1308668356 MeshCollider: m_ObjectHideFlags: 0 diff --git a/BottomGear/Assets/Game/Scenes/TestScenes/Vehicle.unity b/BottomGear/Assets/Game/Scenes/TestScenes/Vehicle.unity index c85b66ca..6eabce2e 100644 --- a/BottomGear/Assets/Game/Scenes/TestScenes/Vehicle.unity +++ b/BottomGear/Assets/Game/Scenes/TestScenes/Vehicle.unity @@ -521,46 +521,10 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 0} m_Modifications: - - target: {fileID: 865184823, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: m_Drag - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 865184823, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: m_Mass - value: 1000 - objectReference: {fileID: 0} - - target: {fileID: 865184823, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: m_AngularDrag - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 865184823, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: m_CollisionDetection - value: 2 - objectReference: {fileID: 0} - target: {fileID: 1389970386, guid: 75980be8169e8844595d320b13a7e456, type: 3} propertyPath: m_IsActive value: 1 objectReference: {fileID: 0} - - target: {fileID: 1817820544, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: test - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1817820544, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: maxAngle - value: 30 - objectReference: {fileID: 0} - - target: {fileID: 1817820544, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: maxSpeed - value: 30 - objectReference: {fileID: 0} - - target: {fileID: 1817820544, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: maxTorque - value: 2500 - objectReference: {fileID: 0} - - target: {fileID: 1817820544, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: criticalSpeed - value: 20 - objectReference: {fileID: 0} - target: {fileID: 1864884027688733411, guid: 75980be8169e8844595d320b13a7e456, type: 3} propertyPath: m_Name value: CustomCar @@ -609,74 +573,10 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 5151564807111174973, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: m_Center.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5151564807111174973, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: m_WheelDampingRate - value: 0.25 - objectReference: {fileID: 0} - - target: {fileID: 5151564807111174973, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: m_SuspensionDistance - value: 0.3 - objectReference: {fileID: 0} - - target: {fileID: 5151564807111174973, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: m_SuspensionSpring.damper - value: 1000 - objectReference: {fileID: 0} - - target: {fileID: 6971916259143222507, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: m_Center.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6971916259143222507, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: m_WheelDampingRate - value: 0.25 - objectReference: {fileID: 0} - - target: {fileID: 6971916259143222507, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: m_SuspensionDistance - value: 0.3 - objectReference: {fileID: 0} - - target: {fileID: 6971916259143222507, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: m_SuspensionSpring.damper - value: 1000 - objectReference: {fileID: 0} - target: {fileID: 8607155943644011075, guid: 75980be8169e8844595d320b13a7e456, type: 3} propertyPath: viewIdField value: 1 objectReference: {fileID: 0} - - target: {fileID: 8823429090271827014, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: m_Center.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8823429090271827014, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: m_WheelDampingRate - value: 0.25 - objectReference: {fileID: 0} - - target: {fileID: 8823429090271827014, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: m_SuspensionDistance - value: 0.3 - objectReference: {fileID: 0} - - target: {fileID: 8823429090271827014, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: m_SuspensionSpring.damper - value: 1000 - objectReference: {fileID: 0} - - target: {fileID: 8962455898984354761, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: m_Center.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8962455898984354761, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: m_WheelDampingRate - value: 0.25 - objectReference: {fileID: 0} - - target: {fileID: 8962455898984354761, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: m_SuspensionDistance - value: 0.3 - objectReference: {fileID: 0} - - target: {fileID: 8962455898984354761, guid: 75980be8169e8844595d320b13a7e456, type: 3} - propertyPath: m_SuspensionSpring.damper - value: 1000 - objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 75980be8169e8844595d320b13a7e456, type: 3} --- !u!1 &2113663694 diff --git a/BottomGear/Assets/Game/Scripts/Car/WheelDrive.cs b/BottomGear/Assets/Game/Scripts/Car/WheelDrive.cs index 736d65ff..cda380c9 100644 --- a/BottomGear/Assets/Game/Scripts/Car/WheelDrive.cs +++ b/BottomGear/Assets/Game/Scripts/Car/WheelDrive.cs @@ -44,6 +44,7 @@ public class WheelDrive : MonoBehaviour private Rigidbody rb; private Wheel[] m_Wheels; public Transform centerOfMass; + public Camera camera; struct Wheel { @@ -61,6 +62,15 @@ public void Awake() // Find all the WheelColliders down in the hierarchy. void Start() { + // --- Deactivate camera if this is not the local player --- + if (camera != null) + { + if (!photonView.IsMine && Photon.Pun.PhotonNetwork.IsConnectedAndReady) + camera.enabled = false; + } + else + Debug.LogError("There is no valid camera in WheelDrive"); + m_Wheels = new Wheel[wheelCount]; WheelCollider[] cWheels = GetComponentsInChildren(); diff --git a/BottomGear/Assets/Resources/BattleRoller.prefab b/BottomGear/Assets/Resources/BattleRoller.prefab index 0351b53f..8f01576a 100644 --- a/BottomGear/Assets/Resources/BattleRoller.prefab +++ b/BottomGear/Assets/Resources/BattleRoller.prefab @@ -45,7 +45,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!4 &1389970387 Transform: m_ObjectHideFlags: 0 @@ -1609,14 +1609,14 @@ Rigidbody: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3922733138180589459} serializedVersion: 2 - m_Mass: 1200 - m_Drag: 0.02 - m_AngularDrag: 0.05 + m_Mass: 1000 + m_Drag: 0 + m_AngularDrag: 0.5 m_UseGravity: 1 m_IsKinematic: 0 m_Interpolate: 0 m_Constraints: 0 - m_CollisionDetection: 0 + m_CollisionDetection: 2 --- !u!65 &865184822 BoxCollider: m_ObjectHideFlags: 0 @@ -1649,9 +1649,11 @@ MonoBehaviour: brakeTorque: 30000 criticalSpeed: 20 maxSpeed: 30 + acceleration: 5 stepsBelow: 7 stepsAbove: 2 centerOfMass: {fileID: 343950545} + camera: {fileID: 2138620560} --- !u!114 &8607155943644011075 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1734,7 +1736,7 @@ WheelCollider: m_Radius: 0.1 m_SuspensionSpring: spring: 50000 - damper: 6000 + damper: 1000 targetPosition: 0.5 m_SuspensionDistance: 0.3 m_ForceAppPointDistance: 0 @@ -1796,7 +1798,7 @@ WheelCollider: m_Radius: 0.1 m_SuspensionSpring: spring: 50000 - damper: 6000 + damper: 1000 targetPosition: 0.5 m_SuspensionDistance: 0.3 m_ForceAppPointDistance: 0 @@ -1858,7 +1860,7 @@ WheelCollider: m_Radius: 0.1 m_SuspensionSpring: spring: 50000 - damper: 6000 + damper: 1000 targetPosition: 0.5 m_SuspensionDistance: 0.3 m_ForceAppPointDistance: 0 @@ -1920,7 +1922,7 @@ WheelCollider: m_Radius: 0.1 m_SuspensionSpring: spring: 50000 - damper: 6000 + damper: 1000 targetPosition: 0.5 m_SuspensionDistance: 0.3 m_ForceAppPointDistance: 0 diff --git a/BottomGear/UserSettings/EditorUserSettings.asset b/BottomGear/UserSettings/EditorUserSettings.asset index c35a1bd0..a4acb8b3 100644 --- a/BottomGear/UserSettings/EditorUserSettings.asset +++ b/BottomGear/UserSettings/EditorUserSettings.asset @@ -18,10 +18,10 @@ EditorUserSettings: value: 224247031146467c0c03096d23205a1e13045707292633032e2c1336acf53a31f6fe flags: 0 RecentlyUsedScenePath-4: - value: 224247031146467c0c03096d23205a1e1304571e293b32032e2c1336f1af003df0f537e0e9742a323016f6 + value: 224247031146467c0c03096d23205a1e1304571e293b32032e2c1336f1af023deaee35e5e2742a323016f6 flags: 0 RecentlyUsedScenePath-5: - value: 224247031146467c0c03096d23205a1e1304571e293b32032e2c1336f1af023deaee35e5e2742a323016f6 + value: 224247031146467c0c03096d23205a1e1304571e293b32032e2c1336f1af003df0f537e0e9742a323016f6 flags: 0 vcSharedLogLevel: value: 0d5e400f0650