N Wheeled Vehicles

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! :stuck_out_tongue:

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? :wink: 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?? :confused: 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

Hey. I really would like to check out your project since I need to build something similar for myself, but the link is invalid. The repository doesn’t exist (anymore) :frowning:
Any way to access the project?

Thanks! :slight_smile:

Already replied to it on a message, but, just to others know.

You need to signup to the Epic’s UE4 source code here > Unreal Engine on GitHub - Unreal Engine <, after linked your github account to UE4 repo, you will be able to see my fork

Man, thanks to you, I was able to see what I was doing wrong, I had one piece of code that I added that broke the transmission. But after comparing it to yours, I realized that was a core difference, we do a couple of things differently, but most of it is of little consequence. Anyways you can see it over here https://forums.unrealengine.com/showthread.php?93866-Fixing-the-Vehicle-class-in-UE4-starting-with-NWheel-implementation&p=434618#post434618

Man, I’m very happy that more people are interested on this, and see it going further! I’ll follow your threat too, read it all and get updated with you guys, maybe I could help on something. Glad that it helped you! Thanks