3 Wheels vehicle setup

I’m trying to correctly setup the wheels of my aircraft actor based on the simple vehicle template, I have been stuck on this problem for a while now, any help or tips would be much appreciated :slight_smile:

The problem: I can’t set the vehicle to 3 wheels without the editor crashing (see “things I tried” below), and when using 4 wheels, the front wheel floats in the air like there is two wheels stacked on the same bone. (no matter which bone is assigned to the fourth wheel).

Infos On my Setup:
I started from the Simple car tamplate, and then added flight physics, which lean on UE4 gravity and collisions for the Aircraft Class (contollable WheeledVehicle chlid class). The flight works well for in this state. (front wheel stacking state)

I took the FBX of the Car supplied in the template, and replaced the mesh of the car by my plane, I then Have redone the bones, vertex groups, materials ect…

Things I tried

  • “pxvis collision” command makes my editor freeze for 15 seconds, then crashes “No minidump found for this crash.”
  • Trying to set the UWheekedVehicleMovementComponent to 3 wheels makes my editor crahses, then I can’t open it without crashing:

` // “Car Simulation” for the aircraft’s Wheels
UWheeledVehicleMovementComponent* Vehicle = CastChecked(GetVehicleMovement());

check(Vehicle->WheelSetups.Num() == 4);`
  • When I Remove One wheel in the vehicle movement component in the editor, the whole vehicle physics doesn’t works (the wheels doesn’t collide anymore, ect…) Which seems quite logical as 4 wheels is needed.

  • Here things starts acting strangely: When I set 3 wheels correctly, and The fourth wheels is set too, but the fourth wheel has a “none” Wheel class, the wheels works well. the airplane moves along the wheels axis without reistance, and they collide correctly. but in this case, the flight physics are affected, it’s like the airplane is very heavy, and the force wihich previously was enough to make is fly, just barely moves is to 12 meters /s (50 meters /s before). I tried changing the weight of the static mesh and the vehicle component, but nothing seems to affect this state.

Thanks for reading :slight_smile:

Ok, so, with the help from Physix crashes - Character & Animation - Epic Developer Community Forums I was able to debug the collsion with the “pxvis collision” command (turned out my landscape was too large, so I debugged my custom pawn in a new blank level). It appeared that:

  1. First I had three inessesary collisions sphere set up in my plane physics asset
  2. The wheels where not the right size and needed a little offset (i updated thoses in Wheel asset)
  3. The CG of the plane was too far back, which explains why it was leaning forward

I aleardy tried to adjust the CG of the mesh, but to correct this I had to adjust the CG in the physical asset. It is still a little bit blurry to me to know where the weight come from and how it’s calculated, I have a weight seeting on the 4Wmovement component, one in my skeletal mesh component, one in the physics asset…

Finally I just had set up 1 kg in the movement compenent, 1 kg in the mesh and set the real weight and CG in the physical asset. All seems to work fine now wheeel side.

Hope this could help somone who encounter the same questions :slight_smile: