Chaos Vehicle Plugin: Create Set Function for Some of the Inputs

Hi all,

I’m trying to create some “set” functions for Change Gear Up RPM, Change Gear Down RPM, and Transmission Efficiency. The idea is I want to change the RPM values according to throttle input. So when you add more throttle, the Change Gear RPMs will increase. And Transmission Efficiency I want to make it like a clutch. I’m using UE5.0.3.

Here’s what I’ve tried:

  1. Changing variable of Chaos::FSimpleTransmissionConfig from ChaosWheeledVehicleComponent as shown below:

Result: Still reading the input from UPROPERTY inside USTRUCT in the header file (the one you input from Details panel). If I disable the UPROPERTY, it uses the default value inside struct (4500). If I delete the input completely, it uses the default value from TransmissionSystem.h (5000) in the game engine.

  1. Changing the variable value of the UPROPERTY inside USTRUCT

Result: Still uses the input from details panel. If I disable it, the default value (4500) is used.

  1. Creating “get” function to read the value of the variable in Chaos::FSimpleTransmissionConfig

Result: It shows 5000, no matter what I do. Even when I revert to the stock plugin and set the Change Up RPM to 7000, it changes at 7000, but the variable still shows 5000. This made me crazy lol.

I have no more idea on how to approach this since I’m new to C++. Would be glad for any help. Thanks!