Multi-wheeled vehicles (more than 4 wheels)

This question has already been asked by https://answers.unrealengine.com/questions/54914/more-than-4-wheeled-vehicles.html However, since the 11th of June there has been no activity on this unanswered question.

So, I’ve created a vehicle with 6 wheels, in the form of an LAV. Unfortunately, adding the 5th and 6th wheel seems to break the animations and wheel setups. Causing the vehicle to sit there, unresponsive. This is very confusing as I don’t know the specifics as to how the new 4.2 vehicle support actually handles the animation and physics of a vehicle. And I certainly don’t want a game where only 4 wheeled commercial vehicles exist.

Basically, my question is: is there a way to use more than 4 wheels to this vehicle pawn?

Hi Daverex,

The short answer is you will need some code support.

Now for the long answer:
The 4 wheeled vehicle that’s provided with the engine uses UWheeledVehicleMovementComponent4w which is a subclass of UWheeledVehicleMovementComponent. PhysX provides an engine simulation for both four wheeled and N-wheeled vehicles. The 4 wheel case is very common among different types of games so we felt it was appropriate to include in the engine. When you start adding more wheels the range of possibilities becomes more gameplay dependent. Note that it’s still possible to do, but it’s not immediately available through blueprint and will require some code support.

Hope that helps clarify it. Please let me know if you have any more questions

I should mention that it IS possible to create a 4 wheeled vehicle which has some fake wheels using ragdolls/animation nodes as others have pointed out in some other posts. However, this will not provide you with a true 6 wheel simulation

Thanks for providing some detail, my way of understanding cannot always start with shortcuts, haha.

I suppose my first question regarding this is, is there an example to follow? I don’t know much about C++ coding besides the basic structure and that “//” before a line means it’s a comment…

Second question, regarding the fake wheels, would be: Does that mean I would simply remove these extra wheels from the drive calculation? Where it asks for the wheel bone names, I mean. And if so, how would you suggest I go about making them rotate with the other wheels? Even if they’re not at all part of the drive process.
//I just tried to remove two of the drive wheel paths from the defaults menu, and the vehicle flew into the air in a surprisingly concise and constant manner. (weeeeeeeeeeeeee!)

So, I figured out how to get the extra wheels to copy the ones that are being counted in the drive calculations. Currently I have it so that they’ll copy them exactly, except that without manually offsetting them along the X axis, they’d try to occupy the same space. In order for this to work, I had to remove the physical bodies for the fake wheels. Is this what you meant to do?

Hi Daverex,

I didn’t have a particular solution in mind but what you’re describing sounds right. There’s of course a number of ways to achieve this effect using blueprints, glad you found something that works.

I don’t know of any c++ examples you could follow at the moment. I’m going to keep this in mind in case we discuss providing more code examples. Please let me know if you’re running into any issues that absolutely require a real physical simulation.

Well, it works for my particular current example. Where it’s a 6 wheeled LAV with two drive axles positioned close to each other. but if I were to, perhaps, build a truck with more than 3 different drive axles, I’m going to need to know how to at least simulate bump physics (when the tires move up and down as it moves over small obstacles, climbing ramps, etc.) Which, really, would completely solve my problem. I’m completely new to the world of animation, so this is going to be a difficult learning process.

While playing with the vehicle anim BPs, I noticed that anything I place there regarding wheel behavior overwrites what the vehicle template says. Is there a node that I simply haven’t found yet, that simulates physics with a sort of “spring” to it? So far the actual spring controller just makes wheels super wobbly in all directions…

Also I should add, the copy translation only uses a bool value, and I can’t really find a proper way to offset the wheels. I’d prefer to simply be able to copy only Z axis movement, but that does not seem to be an option in the copy bone node…
Any time I try with adding physics bodies to the extra wheels, the vehicle either barrels forward and intense speeds, or flies into the air… and I’m too much of a noob to know why or how to fix it, right now.

So vehicles with a number of wheels which isn’t 4 requires some C++ coding? Is there any reference to start off with in order to implement such a vehicle? Specifically I’m attempting to create a 2-wheeled vehicle.

Four wheels vehicles are common and easy to design rather than 6. The problem occurring in project is obvious because you are crossing the maximum probability. Currently no predefined code is available for that, hence you may need to write it yourself. I know it would be complicated and time consuming but there is no others option.

Sorry I don’t know much about it but how do you display these wheels. I tried to do the same as you but nothing happens…
Should I create a 5th and 6th wheel in the blueprint?

This video can help all developers