FSimpleTransmissionSim

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

TVehicleSystem

FSimpleTransmissionSim

References

Module

ChaosVehiclesCore

Header

/Engine/Source/Runtime/Experimental/ChaosVehicles/ChaosVehiclesCore/Public/TransmissionSystem.h

Include

#include "TransmissionSystem.h"

Syntax

class FSimpleTransmissionSim : public TVehicleSystem< FSimpleTransmissionConfig >

Constructors

Name Description

Public function

FSimpleTransmissionSim

(
    const FSimpleTransmissionConfig...
)

Functions

Name Description

Public function

void

 

ChangeDown()

Set the target gear to one lower than current target, will clamp gear index within rage

Public function

void

 

ChangeUp()

Set the target gear to one higher than current target, will clamp gear index within rage

Public function Const

int32

 

GetCurrentGear()

Get the current gear index, (reverse gears < 0, neutral 0, forward gears > 0)

Public function

*float

 

GetEngineTorque

(
    float InTransmissionTorque
)

Return InTransmissionTorque / GetGearRatio(GetCurrentGear()); // #todo: what about transmission frictional losses

Public function

float

 

GetGearRatio

(
    int32 InGear
)

Get the final combined gear ratio for the specified gear (reverse gears < 0, neutral 0, forward gears > 0)

Public function Const

int32

 

GetTargetGear()

Get the target gear index, (reverse gears < 0, neutral 0, forward gears > 0)

Public function

float

 

GetTransmissionRPM()

Get the transmission RPM for the current state of the engine RPM and gear selection

Public function

float

 

GetTransmissionRPM

(
    float InEngineRPM,
    int InGear
)

Get the transmission RPM, from the specified engine RPM and gear selection

Public function

float

 

GetTransmissionTorque

(
    float InEngineTorque
)

Given the engine torque return the transmission torque taking into account the gear ratios and transmission losses

Public function Const

bool

 

IsCurrentlyChangingGear()

Are we currently in the middle of a gear change

Public function Const

bool

 

IsOutOfGear()

Public function

void

 

SetAllowedToChangeGear

(
    bool OkToChangeIn
)

Public function

void

 

SetEngineRPM

(
    float InRPM
)

Tell the transmission system what the current engine RPM is, so we can decide when to change up/down with automatic transmission type

Public function

void

 

SetGear

(
    int32 InGear,
    bool Immediate
)

Set the target gear number to change to, can change gear immediately if specified i.e. rather than waiting for the gear change time to elapse

Public function

void

 

Simulate

(
    float DeltaTime
)

Simulate - update internal state