Following instructions at https://docs.unrealengine.com/latest/INT/Engine/Physics/Vehicles/VehicleUserGuide/ , I tried to set up my own vehicles but I think there is a bug in vehicle physics or the instructions are incorrect. When I start the game, the right-rear wheel sinks into the ground and soon, the whole vehicle sinks into the ground. How can I fix the problem?
I think that vehicles physics won’t work on 2D meshes used for ground. I tried a large 3D box as ground and it worked. Any suggestions?
What type of 2D mesh are you using? It would help to know what kind of setup that you’re using where this issue occurs. Screenshots could be helpful as well.
I created a 2D mesh of ground and “water” for a city in 3DS Max. I added Mesh Collider to 2D mesh. I think that vehicle physics that came with UE4 is screwed up. The vehicles slide all over the ground as if there is ice on the roads. I thought that someone complained about vehicles sliding all over the ground as if there is ice on the roads but I can’t find the thread. Vehicle Physics in Unity 3D 5 is better.
Usually, if a car’s wheels are sliding around as if on ice, either the friction for the Tire Data Types that the wheels are using or the friction for the Physical Material. Anything in the negative range would cause things to become slippery. What kind of collision are you using for this 2D mesh? If possible, could you provide a copy of the project so that I could tinker with the issue myself?
Matthew, How do I send you a copy of my project?
The best way to send it would be to zip the files up and upload them to google drive or another third party hosting site. After that, you can either provide a link to it here or send it directly to me in a private message.
The reason this slippage is occurring is due to the default settings for the vehicle movement component and the VehicleWheel blueprints. There are a few things you can tweak to avoid this. Please try changing the Differential Type in the car’s Vehicle Movement Component under ‘Mechanical Setup’ from Limited Slip 4W to Limited Slip Front Drive and it should work more like expected. The mass of the vehicle may cause some slippage in some cases however. If that is the case, you’d want to tweak the other variables under Mechanical Setup.
As for the VehicleWheel, it looks like you’ve already taken the same one from the Sedan, but from the default settings, you would need to change the Steer angle for them, as they would both default to 70.
You can find a little more information about handling here: Vehicles: Handling & Friction | 03 | v4.2 Tutorial Series | Unreal Engine - YouTube
Other than this, there seems to be something off with your current vehicle asset. It’s most likely an issue related to the physics asset but I’m unsure at the moment. The body of the char seems to rock from side to side and have issues turning even though you seem to of copied all of your settings from the sedan from the template.
Matthew, please rotate the chase camera in car01BP so that you can see the side of the car. If you try to steer the car, the front wheels will steer a little bit to one side and a lot to other side. Also, how should I locate the car’s body at coordinates 0,0,0 in 3DS Max - center of body or bottom of body or so that the bottom of the wheels are touching the X-axis?
From what I can see after exporting the FBX for your car and looking at it in Maya, the bones for the wheels are off.
It’s hard to see here because they’re so small, but the bones are barely not touching the root instead of being at the wheels. This results in the following when you try to set up the wheels in UE4:
The black circles under the vehicle are where the wheels actually are. You can see this by running the console command “pxvis collision” while in PIE. As for the car’s body, it can be anywhere technically as long as the root is at 0,0,0, because the wheels are going to be on separate bones that actually match up with the wheels. If you take a look at the sedan’s skeleton, the Vehicle_Base is also at 0,0,0 and the wheels are higher up so that they are in the middle of the wheels.
==Solved, or at least hacked==
Seeing the collision does help and I was wondering about that for awhile, it felt like I was rolling around on a ball). My pivot was set at 0,0,0 so the wheel was further below.
All the animation works fine, my wheels turn, brake and accelerate properly.
I have all my bones (root and 4 wheels) plus my mesh with X forward and Z up in Max. Everything has been reset (Xforms, etc…). Export FBX Z up.
(mesh is triangulated)
My skeleton in Unreal is proper. All the bones show x forward, z up axis.
When I create collision meshes all four wheels axis are created correctly, though the box mesh for my car isn’t orientated with x forward, z up, Should it be???
Can I move those wheels manually?
Ah, figured it out. You can manually move the physics wheels in the Vehicle Blueprint. Under Vheicle Movement, where you put in your four wheels that match your tire data file.
They have roll-outs, you can just measure in 3d same as you got your tire radius. Or guess. Once you have one wheel figured out you have most the coords for your others.
The physics wheels do seem to lag behind the visual wheel a little. Not sure if thats standard. I have no specifal material files or anything. Just start scene and my imports.
What do I have to do in 3DS MAX to get the car ready for UE4? About bones, do I have to link the wheels to the body? Do I need dummies or helper points?
I don’t know about MAX, but in Maya it takes about 2 minutes. I just place a joint and name it “root”, then open up its attributes and set its location to 0 0 0. Then just align the car so it is centered over the root joint and the wheels are just touching the grid. Then just go into side view, place joints at the center of the front and back wheel, duplicate them then go into front view and drag them to line up with the wheels. Connect all the joints to the root, smooth bind each joint to their wheel and smooth bind the root to the body. Really easy and you’re good to go right into UE4!
I followed this tut:
Mainly pay attention to the way the vehicle is facing, THEN make the bones in that viewport.
I used one mesh, then skinned it. The bones show correct in Unreal skeleton view, but I still don’t know why the physics wheels end up on the root.
I found out that both “Display Units” and “System Units” MUST be set to centimeters. If any 3D model uses any other units, allow 3DS MAX to convert the 3D model to centimeters when loading or importing the 3D model into 3DS MAX.
I tried Maya LT 2016 with Extension 1 but trying to import FBX files created by that program into UE4 crashes UE4 or gives me error message. How can I fix this problem?
check this thread