Vehicles in UE4 , a constructive debate

My Opinion: (Am half asleep, so might add or change a bit)

  1. I really have not started yet, so not sure on the bugs etc.(Was waiting to see things coming together first, the stuff i want to do i don’t think there is to many tutorials on as of yet. Could be wrong though just tell me if so. I am sure somewhere there is, just never found or know where to look for the more complex things i want to do physics wise etc. atleast using vehicles.) That “The Making of the McLaren Car Configurator” was pretty neat. : )

  2. I think Vehicles should be on the same level as characters not second hand to them(I realize they take more time right now, hopefully that could change). A wizard or some sort of easier way to make them work good be great. Tweaking can take alot of time, especially if you have a specialized vehicle and physics. So maybe a way to make tweaking easier and take less time. Not sure how to do this just stating from my perspective, maybe already is easier(do not know). Both actors(character/vehicles) seem very similar to me, so seems like they could be made to work together in a level way of some sort.

  3. Need both realistic, arcade and non physics controlled or interacted in my opinion. (So all sorts that are needed for anything you want to make)

  4. Complex, unique, and almost alive vehicles flexible like characters. (twisty and bendy if possible.soft body type) I have seen plugins that could make this possible, but would rather have them in engine etc. and working good for vehicles(I guess like animated vehicles, not segmented. soft bodies), but plugins are fine too if make things possible and easier. (unreal engine i believe has soft bodies somewhat, but not sure if would work with vehicles though in other words. So something that works with all vehicles is what i mean.)

Also i agree on the vehicle AI, especially for some complex physics and movements of specialized vehicles.

Which means also i would like to see the physics and movements also be able to be added to vehicles like the characters, maybe it is that way already. I need to look into this stuff more in other words, I am sure this stuff is already possible with the right knowledge. Just use to seeing rigid, stiff type vehicles or transformer like vehicles that just have segments and joints etc.

Anyway hopefully you get what i mean, I am bad at explaining things so they can be understood. :slight_smile:

Bugs I have:
1.possessing / unpossesing can become a pain depending on from where you do it.
I want to attach passengers, that are still moveable (rotation only) by the player. this turned out to be a pain. there is a certain bug where, when you possess a child actor, the movement isn’t replicated anymore. only client sees it.
2. if I drive over probs or against foliage with collision I can say good bye to the world because I shoot like a rocket into the air. wheels have a terrible collision detection. the collisions of my trees or bushes don’t look dangerous at all.

my wish is that there needs to be a simplified version of vehicles. there are too many things to tweak atm. its hard for me to get good results because half of the things I don’t even know what they do.
and the most important is **to fix the collision issues **when driving over something. a passenger system would also be nice!

Hi, I thought I’d share my experience with using vehicles in Unreal 4 so far as well as some of the problems I’ve had.
The game I’m working on only has one drive-able vehicle in it so I haven’t had to deal with the wheel-on-wheel collision problem a lot of people seem to have had. Bearing in mind the vehicle I’ve created is open wheel, I’d expect to have to deal with it at some point if I was to integrate any AI controlled vehicles. The game itself isn’t centered around the vehicle but I’m still aiming for a high level of polish, especially in the way it controls and the way it interacts with the environment. I haven’t been able to fully achieve what I want as of yet.

My criticism of the vehicle blueprint class that I’m using is the way the wheel collision is handled. For me, a lot of the time it seems hit and miss, even after pushing up the physics calculations settings considerably. I’m an artist at heart but from what I understand, the collision for the wheel components is some sort of cheap ray casting system, which to me seems some what inherently error prone when taking into account the rate of interaction the wheels have to deal with when travelling at high speeds over rapid changes in terrain. Might have misunderstood though. Sometimes I’ll get fired off into space after a fairly smooth period of game play.

A small bug/ limit of the wheel collision system is the intersections I’m having when interacting with level geometry. The wheels don’t seem to like sharp changes in gradient like 90 degree curbs or very sharp peaks or scattered environment props. After fiddling for hours in the collision settings in the Phys Mat and the Blueprint I’m no further forward. It does the same thing on all sorts of different assets I’ve tried with accurate collision directly on the edge.

Imgur

Imgur

In these two images you can see that I’m trying to mount that ledge up onto the ramp with the front wheels. The wheels intersect past the ramps collision for a time and then the wheel simply pops up above the ramp. It looks really strange and makes the vehicle look as if its lighter than it is. It’s as if the wheels are only firing rays down and not at an angle at which can be read by the environment or something. Then suddenly realizing it’s intersecting and popping the wheel out from inside the environment collision. There’s no resistance from the ramp at those angles at all, when in reality it would take a little more torque to push the front wheels up there onto the top of the ramp surface.

Finally, this vehicle spends quite a lot of time airborne and I’m having trouble directly accessing the Physx vehicle movement component real-time angular velocity to some what control the vehicle in mid are as it’s behaves oddly sometimes when off the ground. I’ve actually just started this part so there may be a solution but for the time being I’m simply dampening the Physx angular velocity for the time being.

I really want to get this right, but from what I’ve read, the Unreal vehicle implementation is scattered and temperamental at best so far with vague signs of improvement soon. I’d rather end up just cutting the vehicle sections all together than make do with erratic driving behaviors.

Thanks to everybody that has posted here, please keep it coming , as they say the more the merryier :slight_smile:

i’m goig to put together a start list on our issue which i’ll put in the second post and i’ll send the info to the people conserned, so hopefully we might get somewhere.

Keep testing and keep posting

Thanks

I’m sending you all a ham for the holidays. w00t!! (Or whatever vegans eat instead of hams-- weed?) :smiley:

nice thread

i havnt played with ue4 vehicles for a while but im astonished to see there are still show stopping issues with wheel collisions.
crazy after all this time and the amount of people involved it hasnt been fixed yet.

for the long term future i would favor a modular vehicle approach
perhaps it could be separate wheels, springs, engines, gearboxes etc but they could be bunched up into user friendly building blocks
or some other way of keeping it simple to use but with the option of creating more complex vehicles from the individual parts

Hello!

Im trying to make a car game in UE4 but unfortuantelly making a simple car in UE4 is very challenging.

1)What known bugs are causing you problems as of 4.12.4

I am facing lots of bug which include: wheels not colliding with the ground, flying wheels, vehicle flying on Rolling over some obstacle ( IDK how this is possible the vehicle had a mass of 1600 kg …)

2)How do you want to make your vehicle ‘engine side’ eg using a ‘wizard’ / base blueprint with add on components / base code with as much open as posible / other ideas

It will be better if UE include a simpler car “factory” which can make the setup of a car simpler

The factory will be amazing if it include :

  • Quick setup for the car (Just enter Bone names and here you go you have a driveable car with default settings ex speed 100 5 gears)
  • Advanced setting to include simpler setting of speed number of gear and so on
  • Better physics for the vehicle and for WHEELS!
  • A simpler way to make Motorbikes
  • Soft body physics to create deformable vehicle like Beamng.Drive
    -A REAL Advanced vehicle Template with braking light, tire marks, drift handling and a moving steering Wheel

I hope unreal will have a look on this :smiley:

3)How important is realism for you

Im working on a arcade game so I don’t care too much about realism Like ProjectCars. For me Unreal just need make Something to improve the vehicle Collisons for not making the vehicle fly each time the vehicle destroy a barrier or hit a police vehicle. The realism for me need just to have a decent comportement for the car.

4) What sort of vehicles do you want to create

I want to make all sort of vehicle including Italian supercars but also some pickups city cars and Old muscle cars !
And maybe in the future I want too make motorbikes too !

My Opinion about vehicles In UE4 :

I think vehicles in UE4 are at the moment hard to setup and they include a lot of bugs. Unreal really needs to do Something better for people doing vehicle properly and betterly including maybe in the future when physics will be fixed Soft Body physics to put Unreal arcade car games onto a new level of realism.

/!\ PS: Sorry if I had a bad English I am

If you look at NFS 2015, the same problem happens. It seems like the collision for the wheels are just a raytrace tracing down. But NFS are not know for groundbreaking physics.

The biggest issue I have with the vehicles is they flip too easily, mostly due to the single raytrace from each wheel.

If there’s any small or short objects that the wheels go over it most certainly causes the vehicle to flip.

Unless you have a game where the roads are perfectly clear like say a racing game, your cars are gonna flip.

So I am making a simulator so I have something complex in my mind.

issues/bugs/show stoppers

  1. Vehicle doesn’t act realistic. I mean - just take a look. It doesn’t seem to have real weight transfer. Does it use PhysX built-in rigid body location force application? If so, than why PhysX make them less realistic than Bullet? Khm… Must be improved.
  2. No control over friction makes me unable to adjust environment correctly.

wish list

  1. Anti-roll bars. If first issue gets fixed than we’ll need to ensure that our cars don’t flip so easily.
  2. Better friction - possibly Pacejka set support. Also better friction is needed by itself. Brush model would already be great.
  3. Live/dead axles - not all cars have independent suspensions. We need live/dead axles.
  4. Camber and toe. If the 3rd wish is completed, than there is one important point - the camber angle changes if one wheel is above other. It’s also common for most of suspension that camber angle changes slightly when suspension compresses and decompresses. And it’s also important to have correct camber setup. So we need camber angles. Firstly - need wheel to be rotated relative to car around it’s camber axis. Secondly - must detect the angle between wheel and road(simple dot product of wheel up vector and surface normal will give cosine of the camber angle between wheel and road). And than it must affect friction. Toe must be simple - it just change the direction of wheel and thus change the direction of forces applied. Slightly.
  5. Soft body tire model. This is less important, but most important. Less important because the car would work with simple ray-based brush model. But it’s most important because the tire simulation is 95% of all the car simulation. You have cool tire simulation? Than your car simulator is amazing. UE4 currently seems to ignore this fact and so the tire simulation is cheap.
  6. Aerodynamics. Yeah, I want there to be option to add wings around car for downforce(or lift in case if I wanna make a plance car). And they must have good simulation with correct angle of attack detection.

Note that realism is critically important to me. I am making simulator.

I am planning to have a few vehicle types - hypercars(where aerodynamics and tire dynamics are highly inportant), offroad cars(where suspensions and differentials are important) and many else. In overall, I need high simulation quality. I could try doing myself, but Blueprints limits me too much, but I have too low C++ experience. So I need epic to do it.
Oh, by the way - I am ready to help Epic team at this topic in whatever way I can(I have some experience with car physics so I really can help). Just contact me and I’ll do what I can:)

I rely on you, Epic team. Do this for me and the rest of community!

Hi @ and!

I just have 1 question really.

Using the simpler of the two UE4 car templates, the sedan one, I used my own model instead.

No matter what I do, if I turn the car too fast for too long it spins out

or, if I drive fast enough in a straight line, the car will spin out after reaching a certain speed

I tried disabling ALL steering on all wheel datas, so I literally can’t turn the vehicle, and it will STILL spin out if it reaches a high enough speed.

This 1 issue is preventing me from using the whole system, because if I can’t have precise control at high speeds I don’t really have a car game.

I’ve noted this issue does not happen in the advanced vehicle template, but I dont know what the difference is that allows the fancier vehicle to go at high speeds in a straight line without spinning out.

Can someone explain to me how to stop the car from spinning out at high speeds even when all steering has been disabled and you are only applying throttle?

Thanks!

:heart:

Rama

If you are using sedan template (sedan template has very low grip/friction) or you made your own vehicle you need make a new Tire Type Data Asset and set friction scale to 2 or anything else higher than 1. And then just set this new Data Asset in your wheels blueprints.

Interesting. Even if grip is low, if wheels are spinning with the equivalent angular velocity to the speed of the car, they shouldn’t lose grip. Do wheels have some sort of maximum angular velocity?

I am not sure :stuck_out_tongue:

Lateral Stiffness and the Wheel Setup

I have learned that in the wheel setup, if I change the lateral stiffness values I can get some really tight controls :slight_smile:

So for anyone who has the spin out / slip issue I recommend checking out the wheel setup!

What was confusing me is that these values are not in the movement component but in the wheel assets, the wheel assets play a huge role, which of course makes real physical sense, but I just was not used to the format and spread-out-ed-ness of the whole thing

:slight_smile:

Rama****

Hi Guys, keep up the great input and help, i think part of the problems/issues some people have is the basic understanding of how vehicles work in real life and how thats been programmed in ue4/physx, trust me its hard to understand why such things like the Ackermann variable is in the steering set up for basic vehicle and others like toe-in/out is not there (or maybe i missed it), theres lots of stuff in there which basic games vehicles don’t really need. if any one wants to chat about stuff like that please give us a shout here. While my Vehicle Mechanic training is a few years out of date (ca 30+) i’m willing to advise where i can, and i know there are some really good people here with lots more knowledge than i have.

so lets keep pushing the engine to the limit, and hope that the bugs get fixed soon.

Hehe… It seems that 99.99% of people are statisfied with the arcade cars in UE4. I could be, but I’m not happy with NFS type(or even more arcady) physics. I need simulation level. But it seems that all ends are pointing in one direction - make it myself.
I don’t know how to code C++, but doing it in blueprints would make huge mess aswell as decrease performance. Hm… I even don’t know what to do…

1. What known bugs are causing you problems as of 4.12.4

Cars breakdancing after hitting a bump. And I didn’t even change anything, just increased the mass because, come on, a vehicle that weights barely 2 tonnes?
Video included. Have a laugh. I know I had.

2. How do you want to make your vehicle ‘engine side’ eg using a ‘wizard’ / base blueprint with add on components / base code with as much open as possible / other ideas

A wizard with an option to fine-tune it later would be amazing. Even better, if car presets could be saved easily as, say, *.xml files and shared.

3. How important is realism for you

Semi-important.

I mean, arcade physics are good for arcade games, sure. But if someone wants to make a realistic racing game, there should be a possibility of making a realistic racing game.

4. What sort of vehicles do you want to create

Currently, just simple 4-wheeled all terrain vehicles with mounted guns. Playing with an idea of remaking a game of my childhood (Safari Biathlon Racer, if anybody happens to remember it). Suspension and stuff, hence my usage of advanced vehicle starting project.

5. My Opinion about vehicles In UE4 :

They’re hilarious to watch. UE4 should really be used to make some sort of a breakdancing simulator. Just make character a car, push some invisible colliders into him, and he’ll do flips and twists you would never think possible.

this was the reason why i agreed to start this thread in the hope that the Dev team would address this issue, with the update of the engine to 4.13 preveiw 1 i don’t see anything in the notes or release video to state the issues is in hand. While i was maybe a little over hopefully for a 4.13 fix to be really honest at the moment i wouldn’t bet $1 on a result this year, considering the dev cycle of 2-3 months per build, i can only say i’m glad i don’t have a game to sell because if i had to i would change engines !!!

I am working on a vehicle system myself, basically I took the whole WheeledVehicleMovementComponent and did replace it with my own one.
It is not finished/working yet, but digging through the code and also digging through the PhysX code I find the vehicle implementation of PhysX impractical for several reasons:

1.) The gearbox setups only allow for 1 reverse gear, tanks for example can have multiple reverse gears
2.) I had a really hard time to get the physx tank drive to work at all. I had substepping enabled, I had friction and slip but the vehicle didn’t move. I have tested it with different torques and friction settings without luck. I have also deactivated the AutoGearbox.
3.) Configuring the vehicles with Phat did never work for me.
4.) Some internal values in the AdvanceCar demo didn’t seem the make sense at all( inertia? it is some time since I have done the tests), that might also be related to the gravity since the unreal engine uses centimeters by default

The final way I am going to approach vehicles is to use the PhysX NoDrive class that basically just provides suspension through the wheel colliders and I do the engine and transmission simulation and even the tire shader function completely on my own.
It is easier and more reliable to apply forces at the wheels directly than messing around with the build in PhysX classes.

All information to setup a vehicle is provided by seperate data assets that can be switched in between, like different engine or transmission setups.

I wonder whether someone else has ever gotten the PhysX TankDrive class to work at all?