Stuck on vehicle creation

Some more ideas here:

Assuming that the player input and wheel setup in the vehicle blueprint is correct (and it probably is considering how many times I guess you’ve done from scratch by now :slight_smile: it might be a good idea to check the orientation of the wheel bodies in PhAT. You can verify their orientation by enabling the translation tool in the PhAT preview window. will show the standard manipulator widget for the selected body, so you can see where its axes are pointing.

The reason I suggest , is that one of the first gotchas I encountered when exporting a simple test vehicle from Cinema 4D was that although everything looked correct visually, it turned out that the wheels’ physics bodies were in fact rolled 90 degrees around X, and (apparently) made it impossible for the vehicle movement component to actually, you know, move anything. I always assumed was just a quirk related to Cinema and its FBX export, but maybe it can happen under different conditions as well.

Does 3DSMax use Z up by default?

Hi Geodav, I made sure that the root and the mesh pivot point were both at 0,0,0. It just seems to be doing a weird thing of sitting above the ground not doing anything. Though at least it isn’t flying off in different directions now.

Hi Demolition Man, The bones system in Max doesn’t add any extra bones when exporting (in Max I have a root and 4 wheels and they come through to Unreal). Unless you use a CAT rig, as it adds a bone for the root and the base system which wont export from Max. It sees it as having too many root bones, the way round that was to parent the bones to the base in the schematic/ hierarchy window and it came through without any problems.

Hi , yeah I’ve had to do a fair few times now, I think It should be ingrained in my brain once I actually get it working! I’m going to have a look at the orientation of the wheels in PhAT, hopefully it will be that!
Cheers

Hi guys, just a quick update on the buggy. The wheels are setup to the bones and the physics have been applied as kinematic, that has now dropped the car to the surface in game. Still no movement though so I’ve had a look at the orientation in the PhAT window as suggested. It’s changed the orientation from what it is in Max. I’ve posted a picture here to show what I mean

I tried using the rotation tool in the PhAT window but it didn’t seem to work, I can rotate it round but there is no effect in game. Is it a case of going back to Max and altering it there?
Cheers

Probably, yes. From what I’ve seen, it’s really important that the physics bodies for the main root and the wheels end up having the UE standard x-forward, y-right, z-up orientation in the physics asset. So, try to rotate your wheel pivots in Max to counteract the error you’re seeing, and export/import again.

Fingers crossed that it’s the missing piece of the puzzle, and big props to you for not giving up!

ok , to me that looks like the standard mistake in max i show how to do in my old ut3 video’s,
1st. what ever you do don’t use max bones
2nd. use max objects, i used pyramids
3rd. for each bone/object align it along the x-axis then go to the hierarchy tab click on affect povit point only then click align to world
4th. link all the bones/objects to the root bone/object which is at 0,0,0

Hey guys, Thanks for all the help!
I’ve managed to get it working and I think I’ve been a bit of a tool.
So I was getting really frustrated with the process and thought I’d have a look at the example project again to see how that behaves. When I played the game it wasn’t doing anything at all which I thought was somewhat odd.
After clicking in the game area/ viewport with the mouse rather than just using the keyboard input, the car started moving! So I reloaded the buggy again and did the same thing and it is moving around.
Holy ****, I think I’ll be bald by the time I get the fully working vehicle in there! Though I’ve been through the setup process that many times I should be able to do it in my sleep now.
Cheers again for the help!

Oh dear!

But, you know… progress has been made. Awesome!

I Was using blender and the bones setup with armature did not work, I had the same result as described here.
After following 's description above and setting the car in Phat to “default” and the 4 wheels to kinametik it started to work. I rotated the wheels to follow the cylinder of the wheels.

Tnx for that.

I’ve had great success with models… i have many very high poly models(with 160+ bone skeletons) with facial animations in the game and love it… but cars… no so much…

I’ve tried with and without bones… after trying 181 times I managed only 1 time to get a vehicle that didn’t fly off the earth on start… tried blender/maya/3ds max and c4d… I find it incredibly vexing… I managed to import a downloaded vehicle successfully, only once looks good, wheels work perfectly, only the car drives -90 degrees from the model… decided that I can’t do any of the custom vehicles I made, so I gave up on it…

I find that the 4.4 preview imports more successfully… give it a try with that using a simple box vehicle…

Hey man, let me know if you have any issues getting it to work, I have been able to get most of mine first try since UE4 version 4.2 came out it became really easy to get a car working. You no longer need to use bones for it, just make the car 1 mesh and each of the wheels 1 mesh each. Then make sure they are aligned properly, and then use the “Link” tool (top left on the main toolbar), and click and drag on a wheel and let go over the body mesh, repeat for each wheel, and you are done.

Before doing that make sure you align all of the parts to be X axis forward, and if you use bones, and make sure the vehicle (or root bone if using them) is centered on 0,0,0, then link it all together, then export it out to UE4.

The reason your car was driving -90 degrees was likely that the bone itself (the root bone and/or the wheel bones) were rotated -90 on Z (which it seems to default to), or because your vehicle wasn’t set to X axis forward, but if it still wont work you can send me the model and I’ll take a look for you.

is the way to set it all up in UE4, see here for details on the editor setup:
.unrealengine.com/latest/INT/Engine/Physics/Vehicles/VehicleUserGuide/

But again, let us know if you have any issues! :slight_smile:

I’ll give it another go… very frustrating… (model’s root zeroed out, xform collapsed - no not maya it sucks, sorry maya fans… 3ds max design 2014 x64, with the helpers and the koala pad i can render a car in 15-20 mins with it…)
I’ve had some spectacular looking models with beeautiful multiayered shaders (if you check my youtube channel[same username as here], a tank, several exotics, and many random vehicles) but if I try ti drive them, they fly off the world…
gave up on being able to do vehicles in ue4, which is sad because that’s half the reason i got UE4 was to play with the hundreds of models I have made over the years…

We could try to help if you can provide one of your models(or a placeholder model made of a cube and 4 cylinders) that has problem.

Hi guys!

I’m new here and I thought it was useless to start a new thread to ask info about vehicle creation and setting when there’s one.
If forum’s netiquette require a new thread I will happily start a new one. I’m not native english speaker so be patient: I try to explain myself as best as I can. :slight_smile:

I’m new to UE4.4, well, back in the days of Unreal and UT I used to make DM maps but UnrealEd has changed a lot!
So I’m learning UE4 from a couple days and managed to get my vehicle work with some efforts, the tutorials really helped and I’d like to thank Epic guys and the community for all the great docs available.

I set up the hierarchy with each wheel-children linked to the body-parent. The body’s pivot is placed at the center of it and is at the same height of the wheel’s center/pivot. I used Wolrd coordinates and collapsed the whole stack of the body in a Editable Poly. Every object lies on the X axis towards front, Z axis is up, the wheel’s pivot is aligned on the inner face of each wheel.

My vehicle is working nicely however I came by a few problems I can’t figure out:

  1. my vehicle is lifted in the air by about 15cm, I mean between the wheels and the ground there’s space, wheels don’t touch the ground, I managed to “solve” by setting a “Z Additional offset”. My wheel’s radius is 40cm but in the wheel’s setting it is 30, if I raise it to 40 more space is added between the ground and the wheels.

  2. When my car runs as soon as it takes speed the body lifts on the suspensions. If I lower the upper range of movement the suspension can do above its original state it gets better and eventually the problem disappears, but the vehicle gets more “twitchy” on road bumps, maybe more detailed geometry of the ground can help, I guess.

  3. When setting up the vehicle I noticed that in the tutorial the guy had to change the physics’ model to kinematic if not the wheels won’t follow the body, I’m not seeing that, the wheels act properly with and without that setting.

Sorry for the wall of text and thanks in advance.

#2 suspension lift while speeding up is a known and will be fixed soon hopefully.

#3 It was necessary in 4.2 but not anymore, as far as i know.

#1 Can you post a screenshot of your vehicle setup in the modeling program and skeleton mesh viewer(with bones enabled to show) inside the editor? I’m guessing there is a problem with the body’s pivot position.

#2, #3, ok, thanks, I hope the suspensions bug will get fixed soon too.

#1, there’re no bones, I just linked the geometry, here’s the hierarchy:
&stc=1&d=1409752302

All the pivots.
&stc=1&d=1409752328

The body pivots.
&stc=1&d=1409752889

Edit: Apparently I did some experiments with the pivot’s position. In the shot it is located at the coordinates you can see at the bottom of the image.

Ok, unlink everything and move the wheels up until they touch 0 in Z axis, dont go below that. Then move the body mesh up in Z axis until it’s bottom lines up with the center of the wheels. Finally set the pivot of the body to 0,0,0, link the wheels to the body and it should work properly now.

Do I need to move the wheels till they have coordinates: X, Y, 0?
If it is like that I did it but it doesn’t work: when I click play as soon as the car touches the ground it flips on the left side and stays like that.
It happened before until I moved the body’s pivot to the center then it worked.

Check out screenshot:

The red line is 0 in Z axis. You dont need to change X and Y. And notice the position of the body and its pivot.

So I made the changes you told me:

I reimported the car and time it isn’t freaking out, but, the car still gently sits above the ground.
Now I’m redoing the vehicle import and setup but still it floats when I click play, I still have add Animation blueprint and wheels blueprint, though.

That would probably be the problem then :slight_smile:
Setup everything else and then see if it works.