From 1f2fb7b96276cea47dff492ba03d417fe61aa08b Mon Sep 17 00:00:00 2001 From: Valera <108022376+kekobka@users.noreply.github.com> Date: Fri, 13 Jun 2025 21:16:20 +0700 Subject: [PATCH] =?UTF-8?q?new=20powertrain=20=D1=81=D0=BC=D0=B5=D1=80?= =?UTF-8?q?=D1=82=D1=8C=20=D1=87=D1=83=D1=80=D0=BA=D0=B0=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/prefabs/cars/debug_car.prefab | 409 +++++++++++++++++++++++++-- 1 file changed, 384 insertions(+), 25 deletions(-) diff --git a/Assets/prefabs/cars/debug_car.prefab b/Assets/prefabs/cars/debug_car.prefab index fda7636..efa4dbd 100644 --- a/Assets/prefabs/cars/debug_car.prefab +++ b/Assets/prefabs/cars/debug_car.prefab @@ -33,23 +33,11 @@ "component_type": "ModelCollider" }, "CounterSteer": 0.1, - "DifferentialRatio": 0.5, - "Driver": null, - "EngineBrakeTorque": 2000, - "EngineState": "Running", - "FlywheelFriction": -6000, - "FlyWheelMass": 80, - "FlyWheelRadius": 0.5, - "FlywheelTorque": 20000, - "Gears": { - "-1": 2.5, - "0": 0, - "1": 2.8, - "2": 1.7, - "3": 1.2, - "4": 0.9, - "5": 0.75, - "6": 0.7 + "Engine": { + "_type": "component", + "component_id": "0bc0d7ab-0688-4447-bb86-271c960a4cd8", + "go": "2059775f-8b05-4f02-b82c-f8b6e1763607", + "component_type": "Engine" }, "HardCollisionSound": "sounds/collisions/car_heavy.sound", "Input": { @@ -59,33 +47,27 @@ "AnalogLook": "0,0,0", "AnalogMove": "0,0,0" }, + "IsDriver": false, "Mass": 1100, - "MaxRPM": 7000, - "MaxRPMTorque": 8000, "MaxSteerAngle": 35, "MetalImpactEffect": { "_type": "gameobject", "prefab": "effects/metal_impact.prefab" }, - "MinRPM": 800, - "MinRPMTorque": 5000, "OnComponentDestroy": null, "OnComponentDisabled": null, "OnComponentEnabled": null, "OnComponentFixedUpdate": null, "OnComponentStart": null, "OnComponentUpdate": null, - "PowerDistribution": -1, "SoftCollisionSound": "sounds/collisions/car_light.sound", "SteerConeChangeRate": 8, "SteerConeMaxAngle": 0.25, "SteerConeMaxSpeed": 1800, - "Stream": "sounds/streams/v8_c63/v8_c63.engstr", "SuspensionDownSound": "sounds/suspension/pneumatic_down.sound", "SuspensionHeavySound": "sounds/suspension/compress_heavy.sound", "SuspensionUpSound": "sounds/suspension/pneumatic_up.sound", "Throttle": 0, - "TransmissionEfficiency": 0.8, "VehicleScrapeSound": "sounds/collisions/metal_scrape.sound", "WheelIgnoredTags": null, "Wheels": [ @@ -152,7 +134,7 @@ "_type": "component", "component_id": "03e04bce-db7b-4547-9cfd-0364849bdb33", "go": "ddd1330f-ec64-48e9-9b48-f2b35f5bb712", - "component_type": null + "component_type": "VeloXCar" }, "OnComponentDestroy": null, "OnComponentDisabled": null, @@ -4996,6 +4978,7 @@ "__type": "VeloX.VeloXWheel", "__guid": "64e23ffa-c2d8-4d1b-97e2-2e6ec074e350", "__enabled": true, + "AutoPhysics": true, "BrakePowerMax": 3000, "CamberAngle": -5, "CasterAngle": 0, @@ -5101,6 +5084,7 @@ "__type": "VeloX.VeloXWheel", "__guid": "1863c712-5c7c-427b-b734-87b732d65502", "__enabled": true, + "AutoPhysics": true, "BrakePowerMax": 3000, "CamberAngle": 5, "CasterAngle": 0, @@ -5206,6 +5190,7 @@ "__type": "VeloX.VeloXWheel", "__guid": "32fbede7-4c34-4f7d-8ec3-594774e693dc", "__enabled": true, + "AutoPhysics": true, "BrakePowerMax": 3000, "CamberAngle": -3, "CasterAngle": 0, @@ -5311,6 +5296,7 @@ "__type": "VeloX.VeloXWheel", "__guid": "52e26121-2451-4373-b101-a2d7a4e51a09", "__enabled": true, + "AutoPhysics": true, "BrakePowerMax": 3000, "CamberAngle": 3, "CasterAngle": 0, @@ -5396,6 +5382,379 @@ "Children": [] } ] + }, + { + "__guid": "a50b774c-47ed-49f5-a09a-de728e1d645f", + "__version": 1, + "Flags": 0, + "Name": "powertrain", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [], + "Children": [ + { + "__guid": "2059775f-8b05-4f02-b82c-f8b6e1763607", + "__version": 1, + "Flags": 0, + "Name": "engine", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "VeloX.Powertrain.Engine", + "__guid": "0bc0d7ab-0688-4447-bb86-271c960a4cd8", + "__enabled": true, + "FrictionCoeff": 0.01, + "IdleRPM": 900, + "Inertia": 0.151, + "Input": null, + "IsRedlining": false, + "LimiterDuration": 0.06, + "MaxRPM": 7000, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Output": { + "_type": "component", + "component_id": "998fc1ee-980e-49ec-9d87-8b5a655438a1", + "go": "96015233-8e68-445d-9361-b268afba55e6", + "component_type": "Clutch" + }, + "RPMPercent": 0, + "StartFriction": -10, + "Stream": "sounds/streams/v8_c63/v8_c63.engstr", + "TorqueMap": { + "rangey": "0,200", + "frames": [ + { + "x": 0, + "y": 0.3537234, + "in": 0, + "out": 0, + "mode": "Mirrored" + }, + { + "x": 0.28374237, + "y": 0.7368113, + "in": -1.2474353, + "out": 1.2474353, + "mode": "Mirrored" + }, + { + "x": 0.61809814, + "y": 0.9946808, + "in": 0.22950783, + "out": -0.22950783, + "mode": "Mirrored" + }, + { + "x": 1, + "y": 0.125, + "in": 0, + "out": 0, + "mode": "Mirrored" + } + ] + }, + "Vehicle": { + "_type": "component", + "component_id": "03e04bce-db7b-4547-9cfd-0364849bdb33", + "go": "ddd1330f-ec64-48e9-9b48-f2b35f5bb712", + "component_type": "VeloXCar" + } + } + ], + "Children": [ + { + "__guid": "96015233-8e68-445d-9361-b268afba55e6", + "__version": 1, + "Flags": 0, + "Name": "clutch", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "VeloX.Powertrain.Clutch", + "__guid": "998fc1ee-980e-49ec-9d87-8b5a655438a1", + "__enabled": true, + "Inertia": 0.002, + "Input": { + "_type": "component", + "component_id": "0bc0d7ab-0688-4447-bb86-271c960a4cd8", + "go": "2059775f-8b05-4f02-b82c-f8b6e1763607", + "component_type": "Engine" + }, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Output": { + "_type": "component", + "component_id": "034c631f-2007-4a1d-916f-cb34ca7b72e6", + "go": "b9dd3824-3720-4628-a375-08061cd3acdb", + "component_type": "ManualGearbox" + }, + "SlipTorque": 1000, + "Vehicle": { + "_type": "component", + "component_id": "03e04bce-db7b-4547-9cfd-0364849bdb33", + "go": "ddd1330f-ec64-48e9-9b48-f2b35f5bb712", + "component_type": "VeloXCar" + } + } + ], + "Children": [ + { + "__guid": "b9dd3824-3720-4628-a375-08061cd3acdb", + "__version": 1, + "Flags": 0, + "Name": "gearbox", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "VeloX.Powertrain.ManualGearbox", + "__guid": "034c631f-2007-4a1d-916f-cb34ca7b72e6", + "__enabled": true, + "BackwardAction": "Attack2", + "ForwardAction": "Attack1", + "Inertia": 0.01, + "Input": { + "_type": "component", + "component_id": "998fc1ee-980e-49ec-9d87-8b5a655438a1", + "go": "96015233-8e68-445d-9361-b268afba55e6", + "component_type": "Clutch" + }, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Output": { + "_type": "component", + "component_id": "57ceb391-79ea-4d2d-a27f-cdd3c18e5789", + "go": "36bec194-1145-4fcf-8b31-d17b220677ab", + "component_type": "OpenDifferential" + }, + "Ratios": [ + 3.626, + 2.2, + 1.541, + 1.213, + 1, + 0.767 + ], + "Reverse": 3.4, + "Vehicle": { + "_type": "component", + "component_id": "03e04bce-db7b-4547-9cfd-0364849bdb33", + "go": "ddd1330f-ec64-48e9-9b48-f2b35f5bb712", + "component_type": "VeloXCar" + } + } + ], + "Children": [ + { + "__guid": "36bec194-1145-4fcf-8b31-d17b220677ab", + "__version": 1, + "Flags": 0, + "Name": "differential", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "VeloX.Powertrain.OpenDifferential", + "__guid": "57ceb391-79ea-4d2d-a27f-cdd3c18e5789", + "__enabled": true, + "BiasAB": 0.5, + "CoastRamp": 1, + "FinalDrive": 3.392, + "Inertia": 0.01, + "Input": { + "_type": "component", + "component_id": "034c631f-2007-4a1d-916f-cb34ca7b72e6", + "go": "b9dd3824-3720-4628-a375-08061cd3acdb", + "component_type": "ManualGearbox" + }, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Output": { + "_type": "component", + "component_id": "f0bca53e-59f2-48fc-9e07-957b981a4722", + "go": "940beb4f-2f6b-4953-bd2d-312c7f4ede71", + "component_type": "PowerWheel" + }, + "OutputB": { + "_type": "component", + "component_id": "3bf9fb99-0bbe-4fa4-b443-64349b2cd3f5", + "go": "df6aec6f-b56f-4696-bd56-ffc02fc99bd3", + "component_type": "PowerWheel" + }, + "PowerRamp": 1, + "SlipTorque": 0, + "SteerLock": 45, + "Stiffness": 0.1, + "Vehicle": { + "_type": "component", + "component_id": "03e04bce-db7b-4547-9cfd-0364849bdb33", + "go": "ddd1330f-ec64-48e9-9b48-f2b35f5bb712", + "component_type": "VeloXCar" + } + } + ], + "Children": [ + { + "__guid": "940beb4f-2f6b-4953-bd2d-312c7f4ede71", + "__version": 1, + "Flags": 0, + "Name": "wheel left", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "VeloX.Powertrain.PowerWheel", + "__guid": "f0bca53e-59f2-48fc-9e07-957b981a4722", + "__enabled": true, + "Inertia": 0.02, + "Input": { + "_type": "component", + "component_id": "57ceb391-79ea-4d2d-a27f-cdd3c18e5789", + "go": "36bec194-1145-4fcf-8b31-d17b220677ab", + "component_type": "OpenDifferential" + }, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Output": null, + "Vehicle": { + "_type": "component", + "component_id": "03e04bce-db7b-4547-9cfd-0364849bdb33", + "go": "ddd1330f-ec64-48e9-9b48-f2b35f5bb712", + "component_type": "VeloXCar" + }, + "Wheel": { + "_type": "component", + "component_id": "32fbede7-4c34-4f7d-8ec3-594774e693dc", + "go": "81fc7805-9643-48d0-b544-9ac5f52872ef", + "component_type": "VeloXWheel" + } + } + ], + "Children": [] + }, + { + "__guid": "df6aec6f-b56f-4696-bd56-ffc02fc99bd3", + "__version": 1, + "Flags": 0, + "Name": "wheel right", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "VeloX.Powertrain.PowerWheel", + "__guid": "3bf9fb99-0bbe-4fa4-b443-64349b2cd3f5", + "__enabled": true, + "Inertia": 0.02, + "Input": { + "_type": "component", + "component_id": "57ceb391-79ea-4d2d-a27f-cdd3c18e5789", + "go": "36bec194-1145-4fcf-8b31-d17b220677ab", + "component_type": "OpenDifferential" + }, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Output": null, + "Vehicle": { + "_type": "component", + "component_id": "03e04bce-db7b-4547-9cfd-0364849bdb33", + "go": "ddd1330f-ec64-48e9-9b48-f2b35f5bb712", + "component_type": "VeloXCar" + }, + "Wheel": { + "_type": "component", + "component_id": "52e26121-2451-4373-b101-a2d7a4e51a09", + "go": "93f0f744-1af2-46eb-a35a-894b10e0fdf0", + "component_type": "VeloXWheel" + } + } + ], + "Children": [] + } + ] + } + ] + } + ] + } + ] + } + ] } ], "__properties": {