ParaToxic Posted March 5, 2012 Share Posted March 5, 2012 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 Quote Link to comment Share on other sites More sharing options...
Canardia Posted March 5, 2012 Share Posted March 5, 2012 I would make it with a box and 4 cylinders. I tried it on airplanes, and it worked pretty well. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
ParaToxic Posted March 5, 2012 Author Share Posted March 5, 2012 What is about the suspension and the inertia? Quote Link to comment Share on other sites More sharing options...
Canardia Posted March 5, 2012 Share Posted March 5, 2012 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. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Mumbles Posted March 5, 2012 Share Posted March 5, 2012 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. Quote LE Version: 2.50 (Eventually) Link to comment Share on other sites More sharing options...
Josh Posted March 5, 2012 Share Posted March 5, 2012 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. Quote 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 More sharing options...
Road Kill Kenny Posted March 5, 2012 Share Posted March 5, 2012 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. Quote 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 More sharing options...
Canardia Posted March 5, 2012 Share Posted March 5, 2012 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. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
paramecij Posted March 5, 2012 Share Posted March 5, 2012 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 Quote Link to comment Share on other sites More sharing options...
Josh Posted March 6, 2012 Share Posted March 6, 2012 This is the vehicle code: Vehicle.bmx Quote 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 More sharing options...
ParaToxic Posted March 6, 2012 Author Share Posted March 6, 2012 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. Quote Link to comment Share on other sites More sharing options...
ParaToxic Posted March 7, 2012 Author Share Posted March 7, 2012 Metatron: Can you post your example of the vehicle,made with bodys here? Quote Link to comment Share on other sites More sharing options...
Flexman Posted March 11, 2012 Share Posted March 11, 2012 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 Quote 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 More sharing options...
Digiverse Posted April 17, 2012 Share Posted April 17, 2012 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.