How to create N-wheeled vehicles

I’ve been trying to figure out how to create a vehicle with a number of wheels other than four. The most I can find is that it requires some code support: Multi-wheeled vehicles (more than 4 wheels) - World Creation - Unreal Engine Forums

Can anyone give any further advice as to how to create a working vehicle which doesn’t use four wheels? Thanks.

I am currently digging through “UWheeledVehicleMovementComponent4W” looking for the same answers as you. I am actually trying to make a 3 wheeled vehicle. So far (just started) I am seeing that the differentials need to be modified (added or removed). Have you done any digging through the source? I think th answer might lie in creating a new UWheeledVehicleMovementComponent using PxVehicleDifferentialNWData instead of PxVehicleDifferential4WData

Have a look at the UWheeledVehicleMovementComponent4W class. From what I can gather from the source UE4 uses a pretty thin wrapper around a PhysX 4W Vehicle. PxVehicleDifferentialNWData (PhysX class) seems to be the way to go for more than 4 wheels. As for less than 4 wheels, it appears physx only likes wheeled vehicles with 3 or more wheels. 3 wheels is actually accomplished by creating a 4 wheeled vehicle then telling physx to ignore one wheel and treat it like a 3 wheeler. It can be either a tadpole style (2F, 1R) or delta style (1F, 2R).

Thanks for the info. Do you know if that is reasonably simple to achieve using UE4? Will I have to modify the engine code?

“telling physx to ignore one wheel and treat it like a 3 wheeler” please, can you elaborate on that? Telling physx to ignore the wheel in the UWheeledVehicleMovementComponent4W? On an higher leve? or just in the wheels setup in the editor? any help would be much appreciated, thanks :slight_smile:

Maybe an easy way to go would be a normal four PhysWheels, placing the front ones close together, and then mapping a single, centered VisWheel copied bone with a 50/50 split to the front PhysWheel motion. I may give that a try sometime soon and see what happens :slight_smile: (maybe the PhysWheels can’t get too close to each other or there will be collision issues)

This Video help you