I have a simple custom vehicle designed in Blender. I am attempting to import this into Unreal to use with the stock WheeledVehicle class, but I’m having a very difficult time getting the physics to work. I have been following the following tutorials: (How to Rig and Setup a Custom Vehicle in Unreal Engine 4 - YouTube), (How to get wheeled vehicle from Blender to Unreal Engine 4 from scratch [OLD] - YouTube), (Vehicles: Overview & Car Setup | 01 | v4.2 Tutorial Series | Unreal Engine - YouTube).
Here are the steps I took:
- Simplify mesh into five parts: body and four wheels
- Create an armature and assign the first bone to have one end at (0,0,0)
- Create another bone from root bone. Disconnect it, and copy it three more times
- Move disconnected bones to wheel centers
- Assign weights so that center chassis is assigned to first bone, wheels are assigned to wheel bones
- Rotate so that +x is forward. Also verify that for all bones, +x is forward and +z is up.
- Export as .fbx with leaf nodes disabled
- Import as skeletal mesh, without textures
- Open up the physics asset. Delete capsules, create spheres for wheels and box around main control volume. Assign spheres to kinematic physics type.
Right here is where I notice things getting weird. If I just add collision spheres for wheels and leave as default physics, three of the four wheels jump to the center of the car. The fourth one stays put.
If I add a collision box, the car flies around wildly inside the PhAT.
I know PhAT can be weird sometimes, so I continue on:
3) Create tire classes for BackWheel and FrontWheel. Restrict BackWheel from turning.
4) Create pawn class extending WheeledVehicle. Assign skeletal mesh to pawn, and assign four wheel bones to the vehicle movement (all as instructed in third tutorial). Add camera and spring arm, and controls.
5) Create GameMode to use car class as default pawn.
Now when I spawn the car into the game, the wheels don’t move, but act as if they have congregated in the center of the car.
It looks like the wheels are actually moving ingame to the center of the car. Does anyone know what is causing this, and how to fix it?