only some parameters of car that you
can change in realtime […]. Speaking about wheels you could only change the frictionscale
I’m not sure I understand. Are you saying that most of the parameters you posted before (such as ShapeRadius; ShapeWidth etc.) can’t be modified at all in realtime?
Shouldn’t that work?
GetVehicleMovement()->Wheels[0]->ShapeRadius = 10;
or (Not sure what the difference is):
GetVehicleMovement()->WheelSetups[0].WheelClass->GetDefaultObject<UVehicleWheel>()->ShapeRadius = 85;
“Where do you use wheels recreating”
I am executing RecreatePhysicsState in the ABuggyPawn (a child of AWheeledVehicle class) inside an event triggered in the vehicle blueprint on key input (event is empty otherwise).
when you use RecreatePhysicsState is
recreates physics state, […] your
car will lose all current physics
force.
On execution (with or without change to any wheel parameters in the event), the car starts to jitter, shake and continuously gets bounced in the air (accompanied by collision sounds set up in the VehicleGame). It is a similar result to a car (or any other skeletal mesh) with auto-generated PhAT bodies.