Merge branch 'master' of git@ooftooft.net:Racesm.git

This commit is contained in:
PokingPines
2024-04-05 14:14:19 +02:00
7 changed files with 4120 additions and 575 deletions

View File

@@ -11,6 +11,7 @@ GameObject:
- component: {fileID: 5420764024659664985}
- component: {fileID: 3239213433477781764}
- component: {fileID: 1857703685905104433}
- component: {fileID: 5418785709807611868}
m_Layer: 0
m_Name: Hotrod
m_TagString: Untagged
@@ -28,7 +29,7 @@ Transform:
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 3.8524709, y: -2.92524, z: -4.392884}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalScale: {x: 0.125, y: 0.125, z: 0.125}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 7953198523918571078}
@@ -43,8 +44,8 @@ Rigidbody:
m_GameObject: {fileID: 5711380006811689493}
serializedVersion: 4
m_Mass: 1500
m_Drag: 0.25
m_AngularDrag: 0.05
m_Drag: 0.1
m_AngularDrag: 0
m_CenterOfMass: {x: 0, y: 0, z: 0}
m_InertiaTensor: {x: 1, y: 1, z: 1}
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
@@ -68,7 +69,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5711380006811689493}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a23c7d66d3ff94847a946cf7b30ca1b7, type: 3}
m_Name:
@@ -76,6 +77,24 @@ MonoBehaviour:
motorTorque: 2000
maxSpeed: 50
steeringRange: 30
--- !u!114 &5418785709807611868
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5711380006811689493}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 58d3a2623a4164b4bb25683edc176b03, type: 3}
m_Name:
m_EditorClassIdentifier:
motorTorque: 40
brakeTorque: 40
maxSpeed: 40
steeringRange: 10
steeringRangeAtMaxSpeed: 10
autoBrake: 20
--- !u!1001 &6613855157239500655
PrefabInstance:
m_ObjectHideFlags: 0
@@ -120,6 +139,14 @@ PrefabInstance:
propertyPath: m_SuspensionDistance
value: 0.25
objectReference: {fileID: 0}
- target: {fileID: 211855197576047450, guid: 0a84c5c2846d02440b5cea7fafee4fa5, type: 3}
propertyPath: m_ForwardFriction.m_Stiffness
value: 2
objectReference: {fileID: 0}
- target: {fileID: 211855197576047450, guid: 0a84c5c2846d02440b5cea7fafee4fa5, type: 3}
propertyPath: m_SidewaysFriction.m_Stiffness
value: 2
objectReference: {fileID: 0}
- target: {fileID: 211855197576047450, guid: 0a84c5c2846d02440b5cea7fafee4fa5, type: 3}
propertyPath: m_SuspensionSpring.targetPosition
value: 1
@@ -204,6 +231,14 @@ PrefabInstance:
propertyPath: m_SuspensionSpring.damper
value: 1500
objectReference: {fileID: 0}
- target: {fileID: 8344151628468935024, guid: 0a84c5c2846d02440b5cea7fafee4fa5, type: 3}
propertyPath: m_ForwardFriction.m_Stiffness
value: 2
objectReference: {fileID: 0}
- target: {fileID: 8344151628468935024, guid: 0a84c5c2846d02440b5cea7fafee4fa5, type: 3}
propertyPath: m_SidewaysFriction.m_Stiffness
value: 2
objectReference: {fileID: 0}
- target: {fileID: 8344151628468935024, guid: 0a84c5c2846d02440b5cea7fafee4fa5, type: 3}
propertyPath: m_SuspensionSpring.targetPosition
value: 1

View File

@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
m_IndirectSpecularColor: {r: 0.44657826, g: 0.49641263, b: 0.57481676, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
@@ -185,53 +185,6 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 450060be716600a46927ba00fb04135b, type: 3}
--- !u!1 &218143925 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 4258781391370674817, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
m_PrefabInstance: {fileID: 2124232202}
m_PrefabAsset: {fileID: 0}
--- !u!4 &218143928 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5049018613629602103, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
m_PrefabInstance: {fileID: 2124232202}
m_PrefabAsset: {fileID: 0}
--- !u!114 &218143929
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 218143925}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a23c7d66d3ff94847a946cf7b30ca1b7, type: 3}
m_Name:
m_EditorClassIdentifier:
motorTorque: 2000
maxSpeed: 20
steeringRange: 30
--- !u!64 &218143930
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 218143925}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 5
m_Convex: 1
m_CookingOptions: 30
m_Mesh: {fileID: 0}
--- !u!4 &257377415 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2129857982551333138, guid: 450060be716600a46927ba00fb04135b, type: 3}
@@ -245,25 +198,9 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 1857703685905104433, guid: 5851f609a58dc884a99030da0105c6db, type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2883785401448142367, guid: 5851f609a58dc884a99030da0105c6db, type: 3}
propertyPath: m_ForwardFriction.m_Stiffness
value: 2
objectReference: {fileID: 0}
- target: {fileID: 2883785401448142367, guid: 5851f609a58dc884a99030da0105c6db, type: 3}
propertyPath: m_SidewaysFriction.m_Stiffness
value: 2
objectReference: {fileID: 0}
- target: {fileID: 3239213433477781764, guid: 5851f609a58dc884a99030da0105c6db, type: 3}
propertyPath: m_Drag
value: 0.1
objectReference: {fileID: 0}
- target: {fileID: 5420764024659664985, guid: 5851f609a58dc884a99030da0105c6db, type: 3}
propertyPath: m_LocalPosition.x
value: 9
value: 1.61
objectReference: {fileID: 0}
- target: {fileID: 5420764024659664985, guid: 5851f609a58dc884a99030da0105c6db, type: 3}
propertyPath: m_LocalPosition.y
@@ -271,7 +208,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5420764024659664985, guid: 5851f609a58dc884a99030da0105c6db, type: 3}
propertyPath: m_LocalPosition.z
value: 70
value: 8.06
objectReference: {fileID: 0}
- target: {fileID: 5420764024659664985, guid: 5851f609a58dc884a99030da0105c6db, type: 3}
propertyPath: m_LocalRotation.w
@@ -305,21 +242,10 @@ PrefabInstance:
propertyPath: m_Name
value: Hotrod
objectReference: {fileID: 0}
- target: {fileID: 6429322875164058677, guid: 5851f609a58dc884a99030da0105c6db, type: 3}
propertyPath: m_ForwardFriction.m_Stiffness
value: 2
objectReference: {fileID: 0}
- target: {fileID: 6429322875164058677, guid: 5851f609a58dc884a99030da0105c6db, type: 3}
propertyPath: m_SidewaysFriction.m_Stiffness
value: 2
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 5711380006811689493, guid: 5851f609a58dc884a99030da0105c6db, type: 3}
insertIndex: -1
addedObject: {fileID: 749736917}
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 5851f609a58dc884a99030da0105c6db, type: 3}
--- !u!1001 &300876409
PrefabInstance:
@@ -730,29 +656,6 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 450060be716600a46927ba00fb04135b, type: 3}
--- !u!1 &749736913 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 5711380006811689493, guid: 5851f609a58dc884a99030da0105c6db, type: 3}
m_PrefabInstance: {fileID: 293910239}
m_PrefabAsset: {fileID: 0}
--- !u!114 &749736917
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 749736913}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 58d3a2623a4164b4bb25683edc176b03, type: 3}
m_Name:
m_EditorClassIdentifier:
motorTorque: 5000
brakeTorque: 20000
maxSpeed: 1000
steeringRange: 60
steeringRangeAtMaxSpeed: 35
autoBrake: 5000
--- !u!1001 &760601908
PrefabInstance:
m_ObjectHideFlags: 0
@@ -1063,101 +966,8 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1802081976}
- {fileID: 218143928}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1047804915
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1047804918}
- component: {fileID: 1047804917}
- component: {fileID: 1047804916}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &1047804916
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1047804915}
m_Enabled: 1
--- !u!20 &1047804917
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1047804915}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_Iso: 200
m_ShutterSpeed: 0.005
m_Aperture: 16
m_FocusDistance: 10
m_FocalLength: 50
m_BladeCount: 5
m_Curvature: {x: 2, y: 11}
m_BarrelClipping: 0.25
m_Anamorphism: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &1047804918
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1047804915}
serializedVersion: 2
m_LocalRotation: {x: 0.32650557, y: 0.6272114, z: -0.32650557, w: 0.6272114}
m_LocalPosition: {x: -27.1, y: 57.3, z: 30}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 55, y: 90, z: 0}
--- !u!1001 &1050407802
PrefabInstance:
m_ObjectHideFlags: 0
@@ -1240,6 +1050,81 @@ Transform:
m_CorrespondingSourceObject: {fileID: 2129857982551333138, guid: 450060be716600a46927ba00fb04135b, type: 3}
m_PrefabInstance: {fileID: 696631378}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1622030914
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1622030916}
- component: {fileID: 1622030915}
m_Layer: 0
m_Name: InputController
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1622030915
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1622030914}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 43a3b21977ed2c64b8d62ca5013ab914, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &1622030916
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1622030914}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -3.367576, y: 0.82818604, z: 3.8048892}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1682630364
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1682630365}
m_Layer: 0
m_Name: camerapoint
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1682630365
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1682630364}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 18.2, y: 0, z: 26.6}
m_LocalScale: {x: 20, y: 20, z: 20}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1802081976}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &1698210948 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 142139215064909979, guid: 4a3c4da6be9dcc545aa33ddf39ccde58, type: 3}
@@ -1271,7 +1156,7 @@ Transform:
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalScale: {x: 0.125, y: 0.125, z: 0.125}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 937396212}
@@ -1290,6 +1175,7 @@ Transform:
- {fileID: 257377415}
- {fileID: 2116660885}
- {fileID: 1299801271}
- {fileID: 1682630365}
m_Father: {fileID: 977927543}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1848958940
@@ -1468,6 +1354,155 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 450060be716600a46927ba00fb04135b, type: 3}
--- !u!1001 &1905594395
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 320316327550477191, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalPosition.x
value: 2.7908077
objectReference: {fileID: 0}
- target: {fileID: 320316327550477191, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalPosition.y
value: 1.5794907
objectReference: {fileID: 0}
- target: {fileID: 320316327550477191, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalPosition.z
value: 10.266191
objectReference: {fileID: 0}
- target: {fileID: 320316327550477191, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalRotation.w
value: 0.6115838
objectReference: {fileID: 0}
- target: {fileID: 320316327550477191, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalRotation.x
value: 0.3549159
objectReference: {fileID: 0}
- target: {fileID: 320316327550477191, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalRotation.y
value: 0.6115838
objectReference: {fileID: 0}
- target: {fileID: 320316327550477191, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalRotation.z
value: -0.3549159
objectReference: {fileID: 0}
- target: {fileID: 679652745285801860, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: field of view
value: 60.000004
objectReference: {fileID: 0}
- target: {fileID: 1387890555408215438, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_Name
value: Camera
objectReference: {fileID: 0}
- target: {fileID: 2100622393876020061, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: Damping.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2100622393876020061, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: Damping.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2100622393876020061, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: CameraSide
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2100622393876020061, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: CameraDistance
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2100622393876020061, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: ShoulderOffset.x
value: 2
objectReference: {fileID: 0}
- target: {fileID: 2100622393876020061, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: ShoulderOffset.y
value: 3
objectReference: {fileID: 0}
- target: {fileID: 6331817402021486753, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalPosition.x
value: -2.5158076
objectReference: {fileID: 0}
- target: {fileID: 6331817402021486753, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalPosition.y
value: 1.9205093
objectReference: {fileID: 0}
- target: {fileID: 6331817402021486753, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalPosition.z
value: -6.9411907
objectReference: {fileID: 0}
- target: {fileID: 6331817402021486753, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6331817402021486753, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6331817402021486753, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6331817402021486753, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6331817402021486753, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6331817402021486753, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6331817402021486753, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8858152487650577344, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_Follow
value:
objectReference: {fileID: 1682630365}
- target: {fileID: 8858152487650577344, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LookAt
value:
objectReference: {fileID: 1682630365}
- target: {fileID: 8890610309520933432, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalPosition.x
value: 2.7908077
objectReference: {fileID: 0}
- target: {fileID: 8890610309520933432, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalPosition.y
value: 1.5794907
objectReference: {fileID: 0}
- target: {fileID: 8890610309520933432, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalPosition.z
value: 10.266191
objectReference: {fileID: 0}
- target: {fileID: 8890610309520933432, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalRotation.w
value: 0.6115838
objectReference: {fileID: 0}
- target: {fileID: 8890610309520933432, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalRotation.x
value: 0.3549159
objectReference: {fileID: 0}
- target: {fileID: 8890610309520933432, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalRotation.y
value: 0.6115838
objectReference: {fileID: 0}
- target: {fileID: 8890610309520933432, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LocalRotation.z
value: -0.3549159
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
--- !u!1001 &2005853890
PrefabInstance:
m_ObjectHideFlags: 0
@@ -1535,371 +1570,12 @@ Transform:
m_CorrespondingSourceObject: {fileID: 2129857982551333138, guid: 450060be716600a46927ba00fb04135b, type: 3}
m_PrefabInstance: {fileID: 330340151}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &2124232202
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 977927543}
m_Modifications:
- target: {fileID: 239808068493503110, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_Drag
value: 0.1
objectReference: {fileID: 0}
- target: {fileID: 239808068493503110, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_Mass
value: 1500
objectReference: {fileID: 0}
- target: {fileID: 599143912545070145, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_LocalPosition.y
value: 0.4
objectReference: {fileID: 0}
- target: {fileID: 613652968110647363, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 613652968110647363, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1082829397675514308, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: motorized
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_Mass
value: 50
objectReference: {fileID: 0}
- target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_Radius
value: 0.004
objectReference: {fileID: 0}
- target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_WheelDampingRate
value: 0.25
objectReference: {fileID: 0}
- target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SuspensionDistance
value: 0.001
objectReference: {fileID: 0}
- target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SuspensionSpring.damper
value: 5000
objectReference: {fileID: 0}
- target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SuspensionSpring.spring
value: 500
objectReference: {fileID: 0}
- target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_ForwardFriction.m_Stiffness
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SidewaysFriction.m_Stiffness
value: 0.95
objectReference: {fileID: 0}
- target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_ForwardFriction.m_ExtremumSlip
value: 0.2
objectReference: {fileID: 0}
- target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_ForwardFriction.m_AsymptoteSlip
value: 0.3
objectReference: {fileID: 0}
- target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_ForwardFriction.m_ExtremumValue
value: 0.8
objectReference: {fileID: 0}
- target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SidewaysFriction.m_ExtremumSlip
value: 0.01
objectReference: {fileID: 0}
- target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_ForwardFriction.m_AsymptoteValue
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SidewaysFriction.m_AsymptoteSlip
value: 0.6
objectReference: {fileID: 0}
- target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SidewaysFriction.m_AsymptoteValue
value: 7.5
objectReference: {fileID: 0}
- target: {fileID: 2390583446416444971, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_LocalPosition.y
value: 0.4
objectReference: {fileID: 0}
- target: {fileID: 2599178774178468494, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: motorized
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3790546188144705370, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: motorized
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4083241972678019647, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: motorized
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4258781391370674817, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_Name
value: Ford
objectReference: {fileID: 0}
- target: {fileID: 4562493253198073265, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: centreOfGravityOffset
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5049018613629602103, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_LocalPosition.x
value: 15
objectReference: {fileID: 0}
- target: {fileID: 5049018613629602103, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_LocalPosition.y
value: 0.7
objectReference: {fileID: 0}
- target: {fileID: 5049018613629602103, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_LocalPosition.z
value: 70
objectReference: {fileID: 0}
- target: {fileID: 5049018613629602103, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_LocalRotation.w
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5049018613629602103, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5049018613629602103, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_LocalRotation.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5049018613629602103, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5049018613629602103, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5049018613629602103, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 180
objectReference: {fileID: 0}
- target: {fileID: 5049018613629602103, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6013378969511991378, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_LocalPosition.y
value: 0.4
objectReference: {fileID: 0}
- target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_Mass
value: 50
objectReference: {fileID: 0}
- target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_Radius
value: 0.004
objectReference: {fileID: 0}
- target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_WheelDampingRate
value: 0.25
objectReference: {fileID: 0}
- target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SuspensionDistance
value: 0.001
objectReference: {fileID: 0}
- target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SuspensionSpring.damper
value: 5000
objectReference: {fileID: 0}
- target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SuspensionSpring.spring
value: 500
objectReference: {fileID: 0}
- target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_ForwardFriction.m_Stiffness
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SidewaysFriction.m_Stiffness
value: 0.95
objectReference: {fileID: 0}
- target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_ForwardFriction.m_ExtremumSlip
value: 0.2
objectReference: {fileID: 0}
- target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_ForwardFriction.m_AsymptoteSlip
value: 0.3
objectReference: {fileID: 0}
- target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_ForwardFriction.m_ExtremumValue
value: 0.8
objectReference: {fileID: 0}
- target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SidewaysFriction.m_ExtremumSlip
value: 0.01
objectReference: {fileID: 0}
- target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_ForwardFriction.m_AsymptoteValue
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SidewaysFriction.m_AsymptoteSlip
value: 0.6
objectReference: {fileID: 0}
- target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SidewaysFriction.m_AsymptoteValue
value: 7.5
objectReference: {fileID: 0}
- target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_Mass
value: 50
objectReference: {fileID: 0}
- target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_Radius
value: 0.004
objectReference: {fileID: 0}
- target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_WheelDampingRate
value: 0.25
objectReference: {fileID: 0}
- target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SuspensionDistance
value: 0.001
objectReference: {fileID: 0}
- target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SuspensionSpring.damper
value: 5000
objectReference: {fileID: 0}
- target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SuspensionSpring.spring
value: 500
objectReference: {fileID: 0}
- target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_ForwardFriction.m_Stiffness
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SidewaysFriction.m_Stiffness
value: 0.95
objectReference: {fileID: 0}
- target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_ForwardFriction.m_ExtremumSlip
value: 0.2
objectReference: {fileID: 0}
- target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_ForwardFriction.m_AsymptoteSlip
value: 0.3
objectReference: {fileID: 0}
- target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_ForwardFriction.m_ExtremumValue
value: 0.8
objectReference: {fileID: 0}
- target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SidewaysFriction.m_ExtremumSlip
value: 0.01
objectReference: {fileID: 0}
- target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_ForwardFriction.m_AsymptoteValue
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SidewaysFriction.m_AsymptoteSlip
value: 0.6
objectReference: {fileID: 0}
- target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SidewaysFriction.m_AsymptoteValue
value: 7.5
objectReference: {fileID: 0}
- target: {fileID: 7320587279522380063, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_LocalPosition.y
value: 0.4
objectReference: {fileID: 0}
- target: {fileID: 7565772832575379995, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_Mass
value: 50
objectReference: {fileID: 0}
- target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_Radius
value: 0.004
objectReference: {fileID: 0}
- target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_WheelDampingRate
value: 0.25
objectReference: {fileID: 0}
- target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SuspensionDistance
value: 0.001
objectReference: {fileID: 0}
- target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SuspensionSpring.damper
value: 5000
objectReference: {fileID: 0}
- target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SuspensionSpring.spring
value: 500
objectReference: {fileID: 0}
- target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_ForwardFriction.m_Stiffness
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SidewaysFriction.m_Stiffness
value: 0.95
objectReference: {fileID: 0}
- target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_ForwardFriction.m_ExtremumSlip
value: 0.2
objectReference: {fileID: 0}
- target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_ForwardFriction.m_AsymptoteSlip
value: 0.3
objectReference: {fileID: 0}
- target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_ForwardFriction.m_ExtremumValue
value: 0.8
objectReference: {fileID: 0}
- target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SidewaysFriction.m_ExtremumSlip
value: 0.01
objectReference: {fileID: 0}
- target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_ForwardFriction.m_AsymptoteValue
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SidewaysFriction.m_AsymptoteSlip
value: 0.6
objectReference: {fileID: 0}
- target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
propertyPath: m_SidewaysFriction.m_AsymptoteValue
value: 7.5
objectReference: {fileID: 0}
m_RemovedComponents:
- {fileID: 4562493253198073265, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 4258781391370674817, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
insertIndex: -1
addedObject: {fileID: 218143929}
- targetCorrespondingSourceObject: {fileID: 4258781391370674817, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
insertIndex: -1
addedObject: {fileID: 218143930}
m_SourcePrefab: {fileID: 100100000, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3}
--- !u!1660057539 &9223372036854775807
SceneRoots:
m_ObjectHideFlags: 0
m_Roots:
- {fileID: 1047804918}
- {fileID: 827083360}
- {fileID: 977927543}
- {fileID: 1622030916}
- {fileID: 293910239}
- {fileID: 1905594395}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9b5f77be9dfb7c14cba3af351597ec83
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -421,6 +421,11 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &1983670534 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5751617850336568147, guid: 5851f609a58dc884a99030da0105c6db, type: 3}
m_PrefabInstance: {fileID: 1328367594557032345}
m_PrefabAsset: {fileID: 0}
--- !u!1 &2026056263
GameObject:
m_ObjectHideFlags: 0
@@ -544,11 +549,6 @@ WheelCollider:
m_CorrespondingSourceObject: {fileID: 1553392025741153767, guid: 5851f609a58dc884a99030da0105c6db, type: 3}
m_PrefabInstance: {fileID: 1328367594557032345}
m_PrefabAsset: {fileID: 0}
--- !u!4 &1328367594557032349 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5420764024659664985, guid: 5851f609a58dc884a99030da0105c6db, type: 3}
m_PrefabInstance: {fileID: 1328367594557032345}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1328367594557032350
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -566,7 +566,7 @@ MonoBehaviour:
- {fileID: 1328367594557032348}
- {fileID: 1328367594557032347}
Wheels: []
CenterOfMass: {fileID: 0}
CenterOfMass: {fileID: 1983670534}
Force: 1000
Angle: 35
BrakeForce: 500
@@ -681,7 +681,7 @@ PrefabInstance:
- target: {fileID: 8858152487650577344, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_LookAt
value:
objectReference: {fileID: 1328367594557032349}
objectReference: {fileID: 0}
- target: {fileID: 8858152487650577344, guid: 80c5f8bcfe7e033419638b39d9a278c4, type: 3}
propertyPath: m_Lens.FieldOfView
value: 60

View File

@@ -51,4 +51,9 @@ public class VehichleControl : MonoBehaviour
Brake();
UpdateWheelMovements();
}
private void Start()
{
GetComponent<Rigidbody>().centerOfMass = CenterOfMass.localPosition;
}
}

View File

@@ -38,7 +38,7 @@ public class carcontrolv2 : MonoBehaviour
// Calculate how close the car is to top speed
// as a number from zero to one
float speedFactor = Mathf.InverseLerp(0, maxSpeed, forwardSpeed);
float speedFactor = Mathf.InverseLerp(0, maxSpeed / 4, forwardSpeed);
// Use that to calculate how much torque is available
// (zero torque at top speed)
@@ -46,6 +46,7 @@ public class carcontrolv2 : MonoBehaviour
// …and to calculate how much to steer
// (the car steers more gently at top speed)
float currentSteerRange = Mathf.Lerp(steeringRange, steeringRangeAtMaxSpeed, speedFactor);
// Check whether the user input is in the same direction
@@ -54,9 +55,12 @@ public class carcontrolv2 : MonoBehaviour
bool isStopping = vInput == 0; // range
bool isBraking = vInput < 0 && forwardSpeed > 0;
bool isBraking = (vInput < 0 && forwardSpeed > 0) || (vInput > 0 && forwardSpeed < 0);
Debug.Log(vInput);
if (vInput > 0 && forwardSpeed < 0)
{
isAccelerating = false;
}
foreach (var wheel in wheels)
{
@@ -65,6 +69,12 @@ public class carcontrolv2 : MonoBehaviour
{
wheel.WheelCollider.steerAngle = hInput * currentSteerRange;
}
if (isBraking)
{
wheel.WheelCollider.brakeTorque = Mathf.Abs(vInput) * brakeTorque;
//wheel.WheelCollider.motorTorque = 0;
}
if (isAccelerating)
{
@@ -76,17 +86,19 @@ public class carcontrolv2 : MonoBehaviour
wheel.WheelCollider.brakeTorque = 0;
}
if (isBraking)
{
wheel.WheelCollider.brakeTorque = Mathf.Abs(vInput) * brakeTorque;
//wheel.WheelCollider.motorTorque = 0;
}
if (isStopping)
{
// If the user is trying to go in the opposite direction
// apply brakes to all wheels
wheel.WheelCollider.brakeTorque = Mathf.Abs(vInput) * brakeTorque + autoBrake;
if (forwardSpeed < 0)
{
wheel.WheelCollider.brakeTorque = (Mathf.Abs(vInput) * brakeTorque + autoBrake) * 5;
}
// wheel.WheelCollider.motorTorque = 0;
}
}