Jump to content

realistic vehicle behavior


ParaToxic
 Share

Recommended Posts

Hey,in the future we want to make a kind of racing game with guns and soone,but the first problem is that the physics behavior of the standart vehicles isn't very realistic.

Is there a way to make it more realistic or write an own controller with the standart leadwerks physics funktions.

 

Thanks

Link to comment
Share on other sites

It can be all faked pretty easily, newton doesn't support realistic physics, so in most cases you have to set gravity to 0 and simulate your own gravity (which you kinda need to do anyway, since the earth is not flat, but round). With airplanes it's especially important, since they can't fly with gravity on. I guess I'll make a car demo soon.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

It can be all faked pretty easily, newton doesn't support realistic physics

 

It's probably the most accurate of the mainstream solvers (Not so sure about bullet since its most recent update). Car suspensions should be possible by joining the cylinders (wheels) to the main box (chassis), and then adjusting the elasticity, softness and friction of the wheels against different "floor" materials. Remembering of course to apply torque to the wheels rather than moving the chassis directly (otherwise the friction won't work correctly for acceleration).

 

 

The required commands are exposed in LE 2, so there is no need to integrate a separate version of newton just for that.

LE Version: 2.50 (Eventually)

Link to comment
Share on other sites

The vehicle implementation uses a raycast approach which makes it stable at fast speeds. A multibody approach gives you more of the "bouncy shocks" feel, but can be unstable at high speeds.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

You have to apply forces to it to fake a lot of things. A few important ones are

- Fake Drag

- Fake Inertia

- Fake Breaks

 

The trick is to figure out what triggers them and exactly when, where and how much of it to apply to your vehicle.

 

I think you'll find that all ray cast vehicles are like this without editing. Even Unreal has the same problem. Play Borderlands or even Rage and you'll notice the vehicle physics is no better than the LE one.

STS - Scarlet Thread Studios

AKA: Engineer Ken

 

Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now!

Link to comment
Share on other sites

The vehicle implementation uses a raycast approach which makes it stable at fast speeds. A multibody approach gives you more of the "bouncy shocks" feel, but can be unstable at high speeds.

That's exactly what's wrong with Newton's car behaviour. It should not be stable at high speeds, because like in LE2 it's just ridiculous that you can't turn over a car even if you want to. And when you turn, it just stops and turns, instead of flipping over 100 times, like it should.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

I've managed to get a somewhat satisfying driving behaviour with the vehicle controller. You can flip the car over doing sharp turns at too high speeds. I couldn't get the brakes to work 100% properly though, but I saw some commands for brakes etc commented out in the .c header, so I thought it would be implemented (or fixed if it was broken) at some point.. of course I realize now that will probably never happen ;)

Link to comment
Share on other sites

I think with some little tricks you can make it a little bit more realistic,like:

-The car hasn't this weights feeling,it jumps and turns when you drive over a little stone

-> Maybe call SetBodyMassCenter and put the position under the car

->take a lower gravity value,but when all tires are in the air the gravity value should get (slowly) higher.

Link to comment
Share on other sites

Just to add to the discussion (and it points to forums for another engine but the principles and problems are the same)

http://forum.unity3d.com/threads/50643-How-to-make-a-physically-real-stable-car-with-WheelColliders

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

Link to comment
Share on other sites

  • 1 month later...

I think one of the main issues with the vehicles is the amazing grip levels they have. It seems impossible to spin a car in Leadwerks due to oversteer. I have seen other non-Leadwerks vehicle demos using Newton that implement more realistic vehicle behaviour by allowing control over individual tire friction and max grip levels.

 

Are we able to fine-tune our vehicles in this way by controlling friction and grip levels of individual tires?

I've tried using SetBodyFriction() on the vehicle chassis to set a generic friction level, but even that seems to make no difference - presumably because the vehicle model isnt in contact with the terrain (the wheels are).

 

It would be great to be able to modify individual tire grip levels in real time but I fear these commands are not supported in Leadwerks (or am I missing something?).

I hope someone can point me in the right direction... no pun intended! Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...