ZeroByte Posted January 30, 2010 Share Posted January 30, 2010 Yes, thank's for that sample Josh. Quote Win 7 64, LE 2.31, Liquid Cooled I7-960 @ 4.00GHz, 6GB DDR3 Ram @ 1600mhz, BFG GTX295, Sound Blaster X-FI. Link to comment Share on other sites More sharing options...
Canardia Posted January 30, 2010 Share Posted January 30, 2010 The default suspensionlength in the headers will be half of the tire radius, as suggested by Josh. 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...
ZeroByte Posted January 30, 2010 Share Posted January 30, 2010 Ok, thank's Lumooja, good to know. Quote Win 7 64, LE 2.31, Liquid Cooled I7-960 @ 4.00GHz, 6GB DDR3 Ram @ 1600mhz, BFG GTX295, Sound Blaster X-FI. Link to comment Share on other sites More sharing options...
ZeroByte Posted January 31, 2010 Share Posted January 31, 2010 Do you guy's know if this will work with LEO in c++. I just started using LEO, and i'm not sure if LEO needs to be updated also, or if it can be ported to LEO ? It's working great with C though, just not sure how to set it up in LEO. Thank's for any info. Quote Win 7 64, LE 2.31, Liquid Cooled I7-960 @ 4.00GHz, 6GB DDR3 Ram @ 1600mhz, BFG GTX295, Sound Blaster X-FI. Link to comment Share on other sites More sharing options...
Josh Posted January 31, 2010 Share Posted January 31, 2010 Should work just the same. The wiki has the C++ and C commands. 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...
ZeroByte Posted January 31, 2010 Share Posted January 31, 2010 Ok, thank's Josh, i'll try setting it up in LEO then. Quote Win 7 64, LE 2.31, Liquid Cooled I7-960 @ 4.00GHz, 6GB DDR3 Ram @ 1600mhz, BFG GTX295, Sound Blaster X-FI. Link to comment Share on other sites More sharing options...
ZeroByte Posted January 31, 2010 Share Posted January 31, 2010 Hi, here is a LEO vehicle example, if anyone is interested: #include "leo.h" using namespace LEO ; float steerangle=0.0; int main( int argn, char* argv[] ) { Engine engine( "leocar", 1280, 800 ) ; Engine::SetAbstractPath( "C:/Leadwerks Engine SDK" ) ; Engine::SetFilters() ; World world( CREATENOW ) ; if( !world.IsValid() ) { MessageBoxA(0,"Error","Failed to create world.",MB_OK); return engine.Free() ; } Buffer gbuffer( Engine::GetWidth(), Engine::GetHeight() ); Camera camera( CREATENOW ); camera.SetPosition( 0, 0, -10 ); Material material("abstract::cement_asphaltscales-01_df_.mat") ; //DebugPhysics(); DirectionalLight light( CREATENOW ) ; light.SetRotation( 45 , 45, 45 ); SetWorldGravity(Vec3(0, -20, 0)); LEO::Collisions::Set(1,1,SLIDINGCOLLISION); // Vehicle Model chassis; chassis.Load("abstract::impreza.gmf", 0); chassis.SetType(1); chassis.SetMass(10); Mesh tire[4]; tire[0].Load("abstract::vehicle_monstertruck_tire_left.gmf", 0); tire[1].Load("abstract::vehicle_monstertruck_tire_right.gmf", 0); tire[2].Load("abstract::vehicle_monstertruck_tire_left.gmf", 0); tire[3].Load("abstract::vehicle_monstertruck_tire_right.gmf", 0); RotateMesh(tire[0],Vec3(0,0,90)); RotateMesh(tire[1],Vec3(0,0,90)); RotateMesh(tire[2],Vec3(0,0,90)); RotateMesh(tire[3],Vec3(0,0,90)); Vehicle veh; veh.Create(chassis); veh.AddTire(Vec3(-1.4,0,1.4),0.5,1.0,80,200); veh.AddTire(Vec3(1.4,0,1.4),0.5,1.0,80,200); veh.AddTire(Vec3(-1.4,0,-1.4),0.5,1.0,80,200); veh.AddTire(Vec3(1.4,0,-1.4),0.5,1.0,80,200); BodyBox groundbody( 100, 1, 100 ) ; Cube ground( CREATENOW ) ; ground.SetScale( 100, 1, 100 ); groundbody.SetParent( ground ) ; ground.SetPosition( 0, -3, 0 ); ground.Paint( material ) ; groundbody.SetType(1); // Game loop while( !Keyboard::I****() && !Engine::IsTerminated() ) { if( !Engine::IsSuspended() ) { // Steering if (KeyDown(KEY_LEFT) && (steerangle<=40.0f)) { steerangle+=1.0f; SetSteerAngle(veh, steerangle, 0); SetSteerAngle(veh, steerangle, 1); } if (KeyDown(KEY_RIGHT) && (steerangle>=-40.0f)) { steerangle-=1.0f; SetSteerAngle(veh, steerangle, 0); SetSteerAngle(veh, steerangle, 1); } // Torque AddTireTorque(veh, 0, -1); if (KeyDown(KEY_UP)) AddTireTorque(veh, 10, -1); if (KeyDown(KEY_DOWN)) AddTireTorque(veh, -10, -1); if (KeyDown(KEY_SPACE)) AddBodyForce(chassis, Vec3(0,200,0), 1); // Lift car SetEntityMatrix(tire[0],veh.GetTireMatrix(0)); SetEntityMatrix(tire[1],veh.GetTireMatrix(1)); SetEntityMatrix(tire[2],veh.GetTireMatrix(2)); SetEntityMatrix(tire[3],veh.GetTireMatrix(3)); Engine::UpdateTime(); World::Update( Engine::GetSpeed()) ; gbuffer.Set(); World::Render() ; Engine::GetBackBuffer().Set() ; World::RenderLights(gbuffer); Engine::Flip() ; } } return engine.Free() ; } I used the monstertruck tires from LE 2.3 SDK, because i can't get the wheel textures to show up on the car wheels. I removed the engine.dll, newton.dll, and shaders.pak from release dir. And i removed the engine.cpp, and leo.cpp from the project. Link to leocar.zip project: http://66.244.240.14/ Link isn't always up. Quote Win 7 64, LE 2.31, Liquid Cooled I7-960 @ 4.00GHz, 6GB DDR3 Ram @ 1600mhz, BFG GTX295, Sound Blaster X-FI. Link to comment Share on other sites More sharing options...
ZeroByte Posted January 31, 2010 Share Posted January 31, 2010 I forgot the cement_asphaltscales-01_df_.mat file, but you can just add your own texture. Quote Win 7 64, LE 2.31, Liquid Cooled I7-960 @ 4.00GHz, 6GB DDR3 Ram @ 1600mhz, BFG GTX295, Sound Blaster X-FI. Link to comment Share on other sites More sharing options...
ZeroByte Posted January 31, 2010 Share Posted January 31, 2010 You will need the recompiled engine.dll Josh posted on this thread. Quote Win 7 64, LE 2.31, Liquid Cooled I7-960 @ 4.00GHz, 6GB DDR3 Ram @ 1600mhz, BFG GTX295, Sound Blaster X-FI. Link to comment Share on other sites More sharing options...
BigB Posted February 1, 2010 Author Share Posted February 1, 2010 Hi all, Good job Josh, and thanks to all to gave me some light to vehicle implentation. I've to try yet, but i've a problem, VS 2008, doesn't recognise some identifiers like Framework, some phy functions, etc... My question is, I'm missing something?(any dll, or whatever) I can't understand it. I do what the Video tutorial "Setting Up VS 2008 c++ Express Edition" tells. Pls help. Quote Link to comment Share on other sites More sharing options...
Canardia Posted February 1, 2010 Share Posted February 1, 2010 In LE 2.0 you need to use Framewerk, not Framework. 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...
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.