Custom physic vehicle simulation! Project download included

Can you atleast explain why when a vehicle hits a bump it pops a wheelie, ive tried every setting variation in the book and no luck even adding mass kg. settings and gravity, but its like if the vehicle wheighs nothing or is bouncy AF. BTW bounciness in the physmat is set to 0. Dude any ideas or is it just a funky limitation of using physcs constraints?

I downloaded the 3.1 version for free from here but it only opens in 4.20 and the latest version is 4.22.3 so,how do i open it in the latest version.
please reply asap

Can we get a step by step tutorial for this? It’s very much needed. It would really help a lot.

Nice project.I have download a different version of you vehicle project,in the latest version vehicle project,I have some question,can you explain it for me?

  1. in the early version,like v1.1 or 1.2,you manually create physics constraint,and you create the rolling constraint link the Axle Mesh and Wheel Mesh and make the swing2 is free,so when apply the torque to the wheel ,the generate friction force can drive the car,but the latest version,you create the physics constraint in blueprint,but i can’t find the rolling constraint you create,you only create suspension constraint and steer constraint,sorry to bother you,because you create physics constraint in blueprint and in runtime,i can’t see the physics constraint component infomation in the detail panel,so i fell confuse.
  2. i have notice in the early version,you set the steer constraint spring and damping to inf in the angular motor section but when you create with blueprint you don’t set the properties why? in the latest version you use the steer strength with the car speed you the force will decrease in the high speed,but in the v3.1 demo project,the car seems can easily steers in high speed and not turn over,Can you explain what changes you have done for it.
    wish you can reply to me,Thank you very much!

You should really check his Youtube channel “Math B”.

Hi! It’s great work, I am impressed! But i have problem with realization all wheel drive (4WD). There is movement forward, but there is no braking … I understand that I am not experienced enough in this, so I would like to know the answer to this question, if possible…

Hi! I’m trying to use this with 4.25. I noticed a problem, when I drive, the car keeps bumping like if it has a lot of bumps on the roads, even though the road is flat (I’m using the Free Road map).
I don’t know the author is still watching this thread, but is there anyone that noticed this problem?

Dont Use physics for cars anymore pls use the new Niagara system setup for cars its alot smoother than physics . follow this tutorial and set up your cars this way iv already done this and it works perfectly -

It’s “PhysX”, not “physics” and “Chaos” (new physics system), not “Niagara” (new particle system).

At least he mentioned a very nice YouTube tut! :wink:

1 Like

Hi! How would achieving arcade/stable drift physics from using settings of these physics work? could you lead me in the direction to do this? Thanks

In general you need to have quite some torque to make the rear driving wheels spin and, to help the skidding, lower the lateral stiffness. Having a locked differential helps as well. You may also want to increase the steering angle of the front wheels to 60-70 degrees. Some drift car can steer at 90 degrees.

Here is a question I am hoping you can answer, Is there anyway to make a cylinder collision in Unreal Engine using PhysX or Chaos Physics?

I have been working on a 3D physics based motorcycle on and off for over a year. One of the biggest issues is the wheel collision.

If you use a sphere for the wheel it works smooth but the issue is the sphere collision sticks out the side and will hit other items or when the bike falls over the wheels will be floating in the air because of the sphere collision.

If you use a convex cylinder the tire works perfect at low speeds and the tire acts realistic but when you start going faster the tires starts to bounce off the ground, see video links below.

Do you know how to make a cylinder in a 3D modeling program that would roll smooth? I have tried making a few different ones in a 3D modeling program and then importing them into Unreal Engine 4.27/PhysX but so far all the ones I made bounce at high speeds.

If this is impossible then might just have to make the game 2.5D

Thank you,
John


Front red wheel is Sphere collision, rear wheel has convex cylinder
Video 1 - Both wheel spheres and rides smooth

Video 2 - Front wheel Sphere and rear wheel convex cylinder rides bumpy and causes crashing

You can create a subdivided cylinder in Blender and apply it as custom collision.

Have you tried Math’s project version 3.1 yet? There is a motorcycle which uses skeletal meshes instead of static meshes. It is worth checking out.

Thank you LFA, I did try the segmenting, if you look at the screenshots you can see how the collision looks when it is imported in to Unreal Engine. The more segiments the smoother it rolls but even if you put 512 segments Unreal Engines will cap it at 128 or something like that and no matter how many you add Unreal will not import them.

I did download MattB’s Physic bar and Bike and they are very cool but they both used Spheres for wheel collision.

If you have any other ideas I would love to hear them. PS: I did read on a thread that Chaos has an experimental Cylinder collision but I could never figure out how you could get it into a project. There is almost no documentation on it.

Got it. For Static Meshes, you have two options to test:

  1. Import wheel mesh with a subdivided cylinder as custom collision (using UCX prefix) Custom collision meshes in Unreal Engine 4 - Tutorial - YouTube

  2. Add custom shape in the Static mesh editor and set use complex collision as simple
    In Blender, make sure to add a subdivision surface modifier, add two edge loops in Edit mode, apply shade smooth, check auto smooth and set 60º and apply modifier at subD 3. Then check smoothing groups, polygroups, triangulate mesh, -Y forward, Zup in the export options as obj. See video.


The green collision is the ‘Simple’ and Complex is Blue. It seems you are using simple.

Hi again L.F.A, Thank you for the additional steps to try. If you change to complex collision Physics will not work, they only work with simple collision. If you have a static mesh that does not move then you can use complex collision. Did you make that custom static mesh? Could you give me the Fbx file so I can import into unreal and test on the bike?

Yes, I can try to upload one here. What dimensions for your wheels? Radius, width?

It shows 73 by 13, this will be interesting to see if this works!