(Simple Question) How do i set a vehicle wheels properties real-time

How do i set a vehicles wheel properties real-time? For example change rear wheels mass when in reverse gear.

EDIT: how do i change it from the vehicle for example vehicle->Wheels->Mass = 10.f;

Hello,

In Vehicle Wheel class, there are special properties for this.
For example, there is one for the mass:

/** Mass of this wheel */
	UPROPERTY(EditAnywhere, Category = Wheel, meta = (ClampMin = "0.01", UIMin = "0.01"))
	float Mass;		

Thus, you can adjust it like this:

this->Mass = 5.f;

Hope this helped!

Have a great day!

Hi, sorry i forgot to mention in the title is there a way i can edit these properties from the vehicle its self. Thanks

In this situation you can use GetVehicleMovement() function:

GetVehicleMovement()->Wheels[0]->Mass = 5.f;

If you like to learn more about Wheeled Vehicle Movement Component class, please go here:

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/Vehicles/UWheeledVehicleMovementComponent/index.html

Yes, I tried that and it didn’t work? i thought i was accessing it the wrong way?

Please make sure that the method in which the line is placed gets called.
You can use add debug message for convenience:

GEngine->AddOnScreenDebugMessage(-1, -1, FColor::Red, FString::SanitizeFloat(GetVehicleMovement()->Wheels[0]->Mass));

I just checked, It is being called and it is changing the variable but it doesn’t doing anything in game. It isn’t “Updating” as such, it just stays as normal?
Is this a bug or something else?

Hello! having the same problem. Any luck figuring this out? I’ve been stuck for months