Vehicle physics problem

I’ve got a mesh of a kart, but on the Physics material the collisions work, while on the game, they don’t work.

For example, is the Physics editor:

And is the game:

The vehicle is flying on the game, but not on the Physics editor. You can see it in simulation on the Physics editor:

The following image shows how I went about doing (I did only for testing, it is a bit overkill I think…), but there is a simpler way…


*EDIT: I wrote last night in a hurry and messed it up a bit, the following is what I meant to say

For each of my 4 axle bones, I right click (one at a time) and choose New Body, and in the popup change the “Collision Geometry” drop-down to a sphere (leave the rest as is) and press ok. will create a basic physics asset for the tire.
Before moving on to the next wheel, in the image above you can see I changed the Physics type to be “Kinematic”, which all 4 tires need to be set at (But NOT on the root bone, just leave that).


The other thing that could be causing the is the tire diameter setting in your front and rear wheel blueprints. The best way is to measure the tire diameter in 3ds max (or whichever tool you use) and then set the tire diameter property in each of those blueprints.

If that still doesn’t fix it, make sure you follow the article below step by step, it will work in the end!! :slight_smile:

.unrealengine.com/latest/INT/Engine/Physics/Vehicles/VehicleUserGuide/

Hope helps, feel free to ask if you need to!

happens when I set the wheels to Kinematic:

Sorry I rewrote some of my original post, was in a hurry last night…

Before you do that, right click on the tire in the panel on the far right, and choose New Body, and in the popup change the “Collision Geometry” drop-down to a sphere (leave the rest as is) and press ok. will create a basic physics asset for the tire. Do for each tire.

I added another image above showing how is done, the “Create the Wheel Collision” image.

is what I did:

From your video I cant see what happens (it must not record dialog boxes), but it looks like it is being set up correctly…

Click on the View button in the viewport, and select “Hierarchy”

Make sure the root bone is above the floor, I had an when tying to play in game, if the start point was too low the car would jump around in a similar fashion (although what you’re experiencing looks more like character rag-doll). You may have to re-export your mesh if the bone is below the floor.

One other thing now that I think of it, it also might be an with how the bone weights were setup in 3dsmax (maya, bender etc… which do you use?) when the skin modifier is added. Did you create mesh yourself? If you did you may need to re-skin it with different settings. If 3dsmax is what you use, is the tutorial I followed for how to “Skin” a car, setting appropriate weights for each bone. is actually likely the problem if the first bit doesn’t help.

https://www.youtube.com/watch?v=Gabf2Q4qdDo

Hopefully is more helpful :slight_smile:

I’m the 3D modeller on project. The model is properly rigged, so is caused by Unreal Engine not being able to properly “process” the asset.
We aren’t getting in other game engines, by the way.

Guys, maybe collision of your wheels and Root body are conflicting?
what you can try - > switch to Constrain Mode, click on your wheel on a right and then at the top section of settings, you should see the name of your current wheel bone and its parent, click on Ignore Collision (or something like that).

EDIT: And to fix “flying” in game you need to setup parameters of your skeletal mesh inside of the blueprint components. Look for simulate physics checkbox.

Is the root bone set to 0,0,0? kind of stuff may happen if it isn’t.

I disabled the collisions on each wheel, but the problem is the same.

http://puu.sh/a2dMT/82d3f74e00.jpg

is the vehicle playlist from who is an Epic guy Introduction to Vehicles | v4.2 | Unreal Engine - YouTube

like and say make sure that the root bone of the rig is at 0,0,0

is what mine looks like in the same view:

Notice the bones (purple wire) are in the center of the sphere’s, not on the inside as in your image. I am not sure where problem is originating, but I would double check your mesh, as in the video link I provided earlier, the setup may be different from other engine’s (I am not sure as I have only tested in UE4, but it is possible the rig needs to be setup differently).

You can also try making the box smaller (on the root bone) using the scale tool so it does not intersect with the bone locations of the tires.

I’m sorry I don’t know what else could be causing , I followed the instructions in the video and it worked first try for me when I imported into UE4.

The root bone is at 0, 0, 0.

If I delete the box, the problem is fixed. Why?

Probably because the box was overlapping the wheel bones (the purple wires, not the spheres), but not sure…

You will want to re-add a box (smaller though, adjust using the scale tool) or else you will be able to drive right through some objects.

Glad to hear it’s working!

Even if I scale the box, the problem isn’t fixed.

ok please trust me on , if the root bone is not on exactly 0,0,0 in you 3d programm you will get the crazy behavior in the physics

in your case i would make sure that the box is not lower that the bottom of the cart, in fact put it a little higher
since you have very small wheels check the radius setting in the wheel blueprint and also lower the suspension max / min ammounts

if all else fails then please upload the mesh + assets so that we can check them

Is your root bone inside of the box?

The root bone is at 0, 0, 0.

http://puu.sh/a2pQz/15c2420d8a.png

Yes.

There is your problem. The root bone should be at 0,0,0 but not the mesh itself. Raise the body and wheels up so that wheels touch the floor, not intersect. You dont need to use bones for the car, btw.

Get rid of the bones of the car
Select the wheels and Link them to the body
Raise the body until wheels touch 0 on Z axis(wheels will move with the body since they are linked now)
Set the body’s pivot to 0,0,0
Select everything and Export

I’ve had it with problem. Maybe one of you guys can take a quick look at it and see what the is. Here’s the model: http://www.mediafire.com/download/d9ghb4a74n8f91h/Kart.FBX

Thanks