Differences
This shows you the differences between two versions of the page.
Previous revision | |||
— | NWH:VehiclePhysics2:Powertrain:EngineComponent [2023/05/16 09:34] (current) – nwhcoding | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Engine Component ====== | ||
+ | |||
+ | [{{ : | ||
+ | |||
+ | The engine acts as a source of power/ | ||
+ | |||
+ | <wrap round info> | ||
+ | |||
+ | == Inertia == | ||
+ | Higher engine inertia results in an engine that is harder to stall. The such engine will also take longer to spin up. | ||
+ | Typical values: | ||
+ | * Sports car: 0.2 | ||
+ | * Average car: 0.3-0.5 | ||
+ | * Semi truck: 1-1.5 | ||
+ | |||
+ | == Power Curve == | ||
+ | The power curve represents engine power across its RPM range. | ||
+ | X and Y values are normalized where X (0 to 1) represents RPM as a percentage of '' | ||
+ | |||
+ | <wrap round info> | ||
+ | |||
+ | [{{ : | ||
+ | |||
+ | == Idler Circuit == | ||
+ | The Idler circuit tries to keep RPM at '' | ||
+ | |||
+ | == Starter == | ||
+ | Starter spins up the engine to try and reach the RPM at which the power generated by the engine is enough for it to spin by itself and overcome the losses. The amount of torque needed is automatically calculated based on the engine inertia, //Power Curve//, and the //Start Duration// value. \\ | ||
+ | When //Flying Start// is enabled, the engine spins up instantly without running the starter. This is to give an illusion of the engine already having been started when the vehicle is woken up. | ||
+ | |||
+ | == Rev Limiter == | ||
+ | Cuts throttle to the engine when RPM reaches '' | ||
+ | |||
+ | == Forced Induction == | ||
+ | {{page> | ||
+ | |||
+ | == Power Modifiers == | ||
+ | Power modifiers can be used through scripting to modify the power of the engine. These are functions that return a '' | ||
+ | |||
+ | < | ||
+ | public float AddBoost() | ||
+ | { | ||
+ | | ||
+ | | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | ... | ||
+ | myVehicleController.powertrain.engine.powerModifiers.Add(AddBoost); | ||
+ | </ | ||
+ | |||
+ | This is a fictional example. A concrete example can be found inside the TCS module which uses this mechanic to limit power when there is wheel spin. | ||
+ | |||
+ | |||