HI
New to UE4.5 having shifted over from UDK and trying to get a customised vehicle running using C++ (and little to no blue-prints if possible).
Having worked on a bunch of console/PC/handheld racing games I thought vehicles would be a good place to start and should be fairly straightforward.
Wasted 2 days on trying to customise a car fully via the Vehicle Game blueprint template and got nowhere - a horrendous number of problems.
Configuring a car over about 20+ different blueprints/tabs/graphs/locations/files is horrific and making changes to the source skeletal mesh and re-importing is an extremely painful process. Trying to compare two vehicle setups across all these data locations leads to madness.
Encountered all sorts of problems with floating car, incorrect physics, bizarre suspension behaviour, very odd vehicle rig, blah, blah.
So I gave up on that and tried the advanced vehicle C++ template instead and managed to import my car and have it driving about using the coded default setup in about 30 mins.
However, this is where progress halted and I can’t work out how to fully tune all the PhysX/UE car setup params.
For example, in the vehicle template MaxEngineRPM value is set in the constructor of the vehicle pawn class like this:
Vehicle4W->MaxEngineRPM = 5700.0f;
I don’t think this does anything & only appears to work as it happens to match the default RPM set elsewhere.
Changing this RPM value and the resulting TorqueCurve still shows 5700 as the MaxRPM when using the physics debugger.
Having plowed through some of the PhysX/UE code I don’t see how it can work as the VehicleSetup function isn’t being called (again).
Changing the default gear ratios from code seems to be somewhat impossible out of the box via C++?
I started to look into my own WheeledVehicleMovementComp class, but there seems to be issues with including the required PhysX types at game code level (I’ll admit I’ve not spent too long looking into this yet). The flow of data to/from PhysX and the UE classes isn’t entirely clear to me, nor is the process for changing values after all the PhysX/UE init work has been done. Is this documented anywhere?
I’ve looked at the forums and there seems to be some ongoing similar issues.
Vehicle setup shouldn’t be this difficult/complicated - ideally there’s only 1 function required that’s used to setup the car fully that’s easily overriden for different car types and just calls “SetupVehicle” to update. It should also easily allow car modifications to be applied for support of player “tuning”. Normally I’d just drive this data from Excel and auto-generate the code for setup per car.
Apologies in advance if I’m missing something obvious here - if anyone can help at all with this I’d be very thankful.
Cheers
William