x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Vehicle Collision Issue

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 crap 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; https://www.youtube.com/watch?v=6ZPPBs6NfiQ

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;

alt text

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!

Product Version: Not Selected
Tags:
more ▼

asked Oct 17 '14 at 04:09 PM in Using UE4

avatar image

MarkyUK
1 2 4 6

avatar image Jacky Oct 17 '14 at 04:13 PM

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.

avatar image MarkyUK Oct 17 '14 at 04:23 PM

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? alt text

avatar image Jacky Oct 17 '14 at 04:30 PM

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.

avatar image MarkyUK Oct 17 '14 at 04:37 PM

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);

alt text

Here's the FBX: http://www.solidfiles.com/d/7fe04e0953/futotest.FBX

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!

avatar image Jacky Oct 17 '14 at 04:47 PM

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.

avatar image MarkyUK Oct 17 '14 at 05:02 PM

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.

alt text

Thanks again.

avatar image Jacky Oct 17 '14 at 05:09 PM

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

alt text

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

carpivot.jpg (60.3 kB)
avatar image MarkyUK Oct 17 '14 at 06:25 PM

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. alt text

Updated FBX (if it helps at all): http://www.solidfiles.com/d/b0cdb0f7ee/futotest.FBX

avatar image Jacky Oct 17 '14 at 06:32 PM

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

avatar image MarkyUK Oct 17 '14 at 06:46 PM

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:

alt text

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).

avatar image Jacky Oct 17 '14 at 06:53 PM

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.

avatar image MarkyUK Oct 17 '14 at 06:58 PM

Still along the X axis;

alt text

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

avatar image Jacky Oct 17 '14 at 07:12 PM

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.

avatar image Jacky Oct 17 '14 at 07:26 PM

Here:

https://www.dropbox.com/s/67ocl1x6cmw0bfl/futotest2.FBX?dl=0

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.

avatar image MarkyUK Oct 17 '14 at 07:36 PM

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.

avatar image Jacky Oct 17 '14 at 07:58 PM

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

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.

avatar image MarkyUK Oct 18 '14 at 02:00 PM

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;

alt text

(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.

avatar image MarkyUK Oct 21 '14 at 06:27 PM

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.

avatar image Jacky Oct 21 '14 at 07:29 PM

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.

avatar image MarkyUK Oct 21 '14 at 08:11 PM

Thanks for getting back to me.

I don't think the hierarchy is the issue, I don't have dummies on the wheels but didn't on the last one and seemingly there's no need for it in UE4 as the existing BP model doesn't seem to have them.

It's recognising the hierarchy and that the wheels are set correctly in UE4 they just happen to be driving sideways again, I think that's the issue and I'm not sure where I'm going wrong.

I've set it to Z-Up (It was on Y).

It looks alright on the BP now, the camera is behind it, the wheels rotate the right way, but the car drives sideways. (However the camera is sideways too when you actually play it).

The car is also running along the x-axis, after x-forming it.

avatar image Jacky Oct 21 '14 at 09:19 PM

Hmm..Can you migrate that vehicle BP to a blank project and then upload it for me to take a look?

avatar image MarkyUK Oct 23 '14 at 03:41 PM

Hi Jacky,

Wasn't sure how to export just the project including the BP, so here's the .fbx file I'm working with now.

http://www.solidfiles.com/d/3a1cba7a2a/nypd2.FBX

I still reckon I'm going wrong somewhere in 3DS Max, as I've followed what I did above exactly with this one too.

avatar image Jacky Oct 23 '14 at 04:45 PM

I must admit this car is the weirdest thing i've encountered with vehicles in UE4. I managed to get it stand correctly looking forward by making a new BP instead of building on top of Sedan BP, but then it crashed when i steered. I have no idea what is up with it but i'll let you know if i can figure it out.

avatar image Ligazetom Apr 08 '16 at 06:35 PM

Just in case you still need help. https://www.youtube.com/watch?v=9gdmJIfuORk made complete tutorial on how to do things in Blender. I did not read all the comments so if you still have some problems, if you will follow this tut I guarantee you will get it work :)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I'm Having the same problem with my vehicle.

more ▼

answered Jun 14 '16 at 11:38 PM

avatar image

sayer6913
24 20 18 26

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question