Hello!
As the title explains, I am working with WheeledVehicleComponent4W and was curious as to how I can make the ‘Differential Type’ enum variable, editable in Blueprints? By default in 4.24 it is not exposed to blueprints so I cannot edit the Differential Type in blueprints.
For example, when the player is driving a 4 wheeled car in 2 wheel drive and gets stuck, I want them to be able to switch to 4 wheel drive and be able to have more torque and traction. Any ideas how to expose this variable?
Those properties are exposed to blueprints, but only editable as defaults.
If I understand correctly you want to modify them at runtime. I took a quick look at it and I’m afraid it will not be possible without C++. Even in C++ it’s not straightforward because you need to update PhysX variables which are on a separate thread from what I understand.
All this however should be possible with a small plugin so you don’t need to modify engine code.
On the side of ugly workarounds, maybe you can try having two WheeledVehicleComponent4W and swapping between them if you can figure out how to enable/disable them. Maybe switching one to neutral gear, while sending input to the other one, would do the job ?
Well I am 100% new to the Vehicle Blueprints and setups and with each vehicle blueprint that I have I’ve noticed that the Differential type by default is Rear Drive Minimal Slip meaning its two wheel drive from the back tires. With the way I have my vehicles setup, they are realistic so its hard for them to climb dirt hills with two wheel drive. I wanted a setup where the player could push a button and switch from 2wd to 4wd in-game. There is no way to do this via blueprints and after I dug around a bit I found out you have to do it at runtime via C++ and I have even less knowledge with C++.