Vehicle Collision Issue

Have you turned it into a vehicle BP and tested in game? Sometimes it works properly even though Phat shows abnormalities. Also looking at the screenshot you need to raise the chasis’ body up a little bit more and scale the wheel bodies down.

Note: Apologies If this is in the wrong section, and note I am fairly new to UE4, however have worked with UDK in the past for quite some time.

I decided to trial out Vehicles in UE4 after reading the wiki and watching a few video tutorials, as It seemed like a doddle compared to UDK. However I seem to have run into some problems regarding the collision boxes around the wheels/the car itself.

I’m ‘borrowing’ a vehicle model from GTA4 just for testing purposes to see how it all works, I imported it into 3DS Max, and have essentially got rid of all the useless ■■■■ you don’t need, kept the high poly model, and condensed all the high-poly model parts, into one for the car, and four seperate parts for the wheels. Re-named them all, and made the wheels children of the car itself. Exactly how the blueprint is for the simple car in UE4.

Now, I’ve been following a very simple tutorial as it seemed to cover everything I wanted to do for now, just to get a mesh working inside UE4; Bender to UE4 Car Tutorial Run Through - YouTube

It’s for Blender, however I’ve copied what he’s done in 3DS max.

I’ve read an article on here, that you don’t need the physics type of the wheels to be Kinematic, so I’ve left that out of the tutorial, but otherwise have followed it. I’m at the part where we’re setting up the collision boxes, and ran into a few problems.

Number 1: There was no existing collision boxes for the wheels, so I had to make some. They first appeared to be ridiculously big, so had to scale them down to the wheel’s size (or near-abouts).

Number 2: After doing everything, and clicking simulate, or playing the game after following through with the rest of the tutorial, the car would just sit on the ground, and the wheel’s would go flying into space, or the car would just spazz out/fall over.

So I’ve diagnosed the problem to be the collisions, quite clearly. I’m suspeting it’s something in 3DS max that needs to be changed/altered, but I’m really puzzled what to do. I’ve tried setting the collision boxes in the Physics Asset editor to be proportionate to the car itself, and look like what is shown in the tutorial, but I’m getting the same results.

Here’s a picture for reference;

Sorry for not explaining it very well, as I said-- I’m very new to vehicles, and I’ve not really worked with ‘moving’ objects that needed anything more than simple collision.

Thanks!

Yes, I’ve followed the tutorial and as part of the tutorial I’ve edited the existing ‘template’ BP to have this vehicles mesh and animation.

In the Physics Asset it’ll simply spazz out, whilst in-game it will fall on it’s side.

I’ve tried increasing the space between the wheel-arch and the top of the wheel, so there’s a fair gap now. I’m not really able to scale the wheel’s collision body down anymore (in the Physics Asset/editor in UE4) as it seems to be as small as it will go.

Still seems to just do what I said above and fall on it’s side. I’m not quite sure what’s going on or what’s going wrong!

Thanks for the help.

Edit: In the video the wheels/car’s collisions seem to overlap just fine?

Overlapping bodies is fine, i was concerned about the chasis’ collision being lower than the root bone.

Now that you mention you arent able to scale them down; is it possible that the car is too small? size causes issues with physics so thats a possibility. If thats not the case upload the fbx file of the car and i’ll take a look if you like.

Ok, i think i got it. It is too small so thats one of the problems. The other problem is looks like you didnt reset Xform after making modifications(size, rotation, etc.) to the car in 3ds Max. Select all 5 parts of the car and reset xform > convert to editable poly > set unit type to Centimeters in export dialogue box. Give it another try and let me know how it goes.

You could be right about the scale, It was ‘very’ small in both 3DS Max and UE4 upon import, so I decided to scale it up, and rotate it in order for it to match up with the preset camera angles on the default BP.

Here’s what It looks like when the BP sits as an asset in the editor (for scale);

Here’s the FBX: futotest.FBX | Solidfiles

I’m pretty certain it’s something that’s cocked up in 3DS max or from when I imported it.

Really appreciate the help, trying to self-tutor yourself as a student in your spare-time can be a little demotivating!

Rookie error’s, hah.

Ok, we seem to be getting places, the vehicle no longer does nothing, it’s still sits on the ground (resting on the chassis, the wheels are half submerged). The wheels however, do work (they spin, and turn mostly) but obviously it doesn’t move anywhere.

Thanks again.

One more thing i forgot to mention(you can blame me for not checking out in my previous post :stuck_out_tongue_winking_eye: ) The chasis’ pivot point is set wrong so you’ll need to fix that as well before you export, like so;

18209-carpivot.jpg

Set the pivot’s Z to the wheels’ touch point and then set the chasis location to 0,0,0, and export.

Ah, yeah! I sorted that after I sent you the FBX (silly me), however I had the pivot central to the car chassis on all axis, didn’t think to put it in contact with where the floor would be.

It seems to be sorted the collisions, it now just appears the game thinks I’m driving a car sideways, haha;

(Not sure why as the blueprint indicates the camera is behind it, I assume some axis are messed up somewhere).

I’ll give all the settings a glance over, however If it’s an easy fix I’d love to know (probably to do with me rotating it in 3DS max, probably shouldn’t have).

Thanks again.

It may have to do with the order you set the wheels in vehicle BP. Make them in this order if you havent already:

  • Wheel 0 > Front Left
  • Wheel 1 > Front Right
  • Wheel 2 > Rear Left
  • Wheel 3 > Rear Right

For some reason my last post didn’t send/save!

I changed the pivot after I’d sent you the FBX, however I’d centred it to all vertices to the centre of the chassis. Didn’t think to put it where the wheels would come in contact with the ground.

It seems to have sorted the collision issue, however my car is now driving sideways (or so the game thinks it should!) I know it’s probably a simple fix, or likely down to me rotating the car in 3DS Max before, but If it’s a simple solution It’d be great to know, otherwise I’ll do some digging in the settings.

But hey, it’s not spazzing out or falling through the floor now, so it was definitely that which was the issue.

Updated FBX (if it helps at all): futotest.FBX | Solidfiles

That’s all correct-- no worries there.

It’ll drive normally, the wheels spin the right direction, but the movement goes sideways (bizarre!) I haven’t fiddled with any settings from the normal BP other than those listed in that tutorial. I tried rotating the vehicle back to where i’d originally had it but then the wheels starting spinning sideways too, haha.

On another note, I still don’t seem able to make the collision boxes for the wheels any smaller. It’s a minor niggle which won’t make much difference but I was just wondering why I’m not able to set them anymore smaller, where-as with the original BP sedan, they can be made as big or as small as I like.

I guess it’s something in 3DS to do with scale, or the pivot again?

Thanks again.

Edit:

It’s weird, because even the chase camera is showing as behind the car in the BP, but yet when I play it’ll be at the side (the direction the movement is going).

Still along the X axis;

The updated FBX I posted a few posts ago is what I’m using, but that was only the pivot changed.

Weird. It shouldnt be happening as long as the car is along the X axis before you exported. It was facing X in the file you sent me so i’m not sure if thats the problem unless you rotated it later on?

And dont worry about the wheels bodies. Wheels dont have collision, they cast rays for floor detection so it is irrelevant to this issue.

I just checked the second FBX you uploaded and it has the same issues the first one had. I’ll fix it and upload it in a couple of minutes.

Here:

What i did is;

  • Unlink everything
  • Reset Xform for the meshes
  • Convert to editable poly
  • Customize > Units Setup > Select Generic Units > Set System Unit Setup to Centimeters.
  • Export with Units set to Automatic.

Works a treat, thanks so much for all of your help.

The only thing is, after importing yours into 3DS max, 3 wheels are huge, and one is tiny!

Thanks again.

No problem. Next time dont bother with ripped models, they make you lose more time than you would expect. :stuck_out_tongue_winking_eye:

I dont know what may be wrong with the wheel sizes now, but you can follow the steps i took and export the original model if you want to make further modifications to it in 3ds Max.

Sorry for bumping this, and I realise this isn’t as much of a UE4 topic anymore, however If Jacky would be able to reply to this, I’d really appreciate it.

Hi Jacky, I followed the last step, where you tweaked the model for me.

I decided to start the process again on a cleaner model (not a port/conversion), with a simple .3ds document for a car I found off the internet.

I’ve done all the steps you said in the last post, however it’s still ‘driving sideways’.

Here’s what I’ve done.

I’ve reset the x-form.
I wasn’t able to unlink the parts, as surely in UE4 I need to retain the hierachy for the parent/child because the Vehicle_Base needs to be a parent of all the other parts? I assigned this to a dummy this time around, I assume that’s the correct way to do it.

I’ve got it facing along the x-axis this time, however If I reset the x-form on the dummy, it’ll put it back along the y-axis. So I just choose to do it on the 5 parts (body + 4 wheels).

It’s still the exact problem as last time, sorry for dragging on about what must seem like a simple and newbie error, I just can’t get it to work and have followed all the steps you mentioned minus the linking.

There is no harm in using a dummy as your root bone if it is working but you dont need to reset xform for the dummy. We had to reset xform for the previous model because it came from another software and been manipulated, so we had to freeze all the transform information with reset xform. If it isnt too much work for you, you can follow this link hierarchy:

  • Root Dummy
  • Car chasis
  • Wheel dummies for each wheel(positioned at wheels’ pivot origins)
  • Wheel meshes

Link everything listed from bottom to top to each other and then export and see how it goes. Also make sure Z axis is set as Z-Up in export settings.