N Wheeled Vehicles
Hi everyone! I’ve been working on this modification on UE4 source code for weeks, and this is what I could get until now. :o
Just to remember! I’m very new to C++, used all my (poor) knowledge on php and javascript to build it, so … use it at your own risk!
Used the WheeledVehicleMovementComponent4W files to create my NW version. There is some functions that NW vehicles can’t use, like Ackermann correction and differential types, since you have to tell PhysX witch wheels you want to be connected to the differential. When you create a new vehicle, there will be two options from the classes to choose, WheeledVehicle, and WheeledVehicleNW, guess what you have to choose? After that, the setups is the same, but the wheels, where you will find a new boolean (checkbox) next to the wheel class, wheel offset and bone name; Tick that and that wheel will receive the engine torque. PhysX have the following limitation: the torque available, will be equally be distributed to all the wheels connected to the differential. Ok?
Right now, I don’t know (yet) if PhysX handles wheels there are off the ground, for example: On my video you see the truck trying to ‘climb’ (? sorry for my english) that ramp. The first 2 wheels of the differential are not on the ground. Is PhysX using than all the torque on these two remaining wheels?? I don’t know.
So, it’s this, my work is on GitHub if you want to test it out, it’s a bit different from the video, since I’ve updated it a bit, but still works, until now.
Comments? Thank you all. :o