Jump to content

diedir

Developers
  • Posts

    258
  • Joined

  • Last visited

Everything posted by diedir

  1. very cool little josh ! really nice done, he runs like a real child, but as someone tells on youtube he is sliding when stopping, not a pbm for me though... keep it up, Kevin
  2. Hi all i am trying to make "setkey("friction") working but from 0.0 to 1.0, no obvious change seems appear. do we must tweak the chassis or each tire ? no luck on both. i tried then "object.tire:SetFriction" as seen in the train-trucks scripts don't work at all (give error) works only with chassis i set it in the main lua script of my car. here my code: require("scripts/class") require("scripts/loop") require("scripts/math/math") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) function object:UpdateMatrix() self:UpdateTires() end function object:UpdateTires() local speed for n=0,3 do if self.tire[n]~=nil then self.tire[n]:SetMatrix( self.vehicle:GetTireMatrix(n) ) if self.emitter[n]~=nil then self.emitter[n]:SetMatrix(self.vehicle:GetTireMatrix(n)) self.emitter[n]:Pause() if self.vehicle:TireIsAirborne(n)==0 then speed = math.abs(self.model:GetVelocity(0).z) speed = (speed - 4) * 20.0 --20 speed = Clamp( speed, 0, 1 ) * 0.5 if speed>0.2 then -->0 self.emitter[n]:Resume() self.emitter[n]:SetColorf(1,1,1,speed) end end end end end end local couronne local pivot local suspensionlength=0.2 --0.1 local springconstant=50 --25 local springdamper=200 --115 object.vehicle=CreateVehicle(object.model) object.model:SetMass(2.2) object.model:SetFriction(0.4,0.3) object.model:SetKey("Gravity",1) object.tire={} object.emitter={} pivot=object.model:FindChild("roueavantg") if pivot~=nil then tireradius=pivot.aabb.h/2.0 object.vehicle:AddTire(TFormPoint(pivot.position,pivot.parent,model),tireradius,suspensionlength,springconstant,springdamper) object.tire[0]=LoadMesh("abstract::lp_roueavtg.gmf",object.model) pivot:Hide() end pivot=object.model:FindChild("roueavantd") if pivot~=nil then tireradius=pivot.aabb.h/2.0 object.vehicle:AddTire(TFormPoint(pivot.position,pivot.parent,model),tireradius,suspensionlength,springconstant,springdamper) object.tire[1]=LoadMesh("abstract::lp_roueavtd.gmf",object.model) pivot:Hide() end pivot=object.model:FindChild("rouearg") if pivot~=nil then tireradius=pivot.aabb.h/2.0 object.vehicle:AddTire(TFormPoint(pivot.position,pivot.parent,model),tireradius,suspensionlength,springconstant,springdamper) object.tire[2]=LoadMesh("abstract::lp_rouearg.gmf",object.model) pivot:Hide() end pivot=object.model:FindChild("roueard") if pivot~=nil then tireradius=pivot.aabb.h/2.0 object.vehicle:AddTire(TFormPoint(pivot.position,pivot.parent,model),tireradius,suspensionlength,springconstant,springdamper) object.tire[3]=LoadMesh("abstract::lp_roueard.gmf",object.model) pivot:Hide() end object.emitter={} object:UpdateTires() if fw~=nil then SetWorld(fw.transparency.world) for n=0,3 do if object.tire[n]~=nil then --createemitter(50,2000,Vec3... object.emitter[n]=CreateEmitter(5,2000,Vec3(0,1,0),0,object.tire[n]) object.emitter[n]:SetPosition(Vec3(0,-object.tire[n].aabb.h/2.0,0)) object.emitter[n]:SetParent(model,1) object.emitter[n]:SetRadius(0,4) --1.6 object.emitter[n]:SetWaver(0.2) --1.0 object.emitter[n]:Paint(LoadMaterial("abstract::roaddust.mat")) object.emitter[n]:SetRotationSpeed(0.1) object.emitter[n]:Pause() end end SetWorld(fw.main.world) end object.model.buoyant=0 object.model:SetKey("collisiontype",COLLISION_PROP) object:UpdateTires() end if someone could post a working exemple of friction applied. thank you
  3. last news i think that all my trouble is due to car hierarchy that is not well transfered via object to gmf, i must pass via fbx or dae file to keep the hierarchy or the pivot car. well, i must digg in all that.... EDIT: Great news : it works thanks to macklebee and marley ghost for their code help the problem was the model in obj which don't keep hierarchy with it to gmf ! trying the max to gmf export after parenting in max, worked ! we need a LE tool to do this outside max, please ! i can't afford a max license
  4. well, i created hull phy files with my car and the 4 wheels apart, did mycar.lua and put the modified code found in the 1st link => no luck tried with the monster_truck modified lua => with no luck too tried modified driver_truck.lua in scripts/game and => crashed "Window access violation" when ctrl+g will retry tomorrow, tired now... EDIT: still not working at the moment...
  5. thanks both for answers since i'am at job now i can't try all that but i will this evening, thanks for the leads
  6. ok thanks macklebee for that precision. i didn't made a difference before that. if someone could describe the complete method for implementing a simple car : naming convention ? dummy pivot placing ? if it has something special to see... because just giving the gmf created is not very formative...
  7. thank you but where can i put that in the lua script ? an error occurs when i put the line in."Exception violation...." and editor shuts down. anyway an error occured when i "play" the monstertruck script even if the model shows up fine in editor.... "table index is nil" and the line : "classtable[modelreference]=class" is pointed weird code there, loose my mind in it... my car has no physic hull (for the moment), perhaps it is the problem...
  8. Hi all i am trying to make a car working like the monstertruck (for the moment) but i don't know exactly how i can show up tires because, i copied the monstertruck script with no luck thanks for helping
  9. no luck with this too. thanks for your time MG i will retry all new fresh tomorrow EDIT::: OMG it works !! thank you for your code: i put my sdk path with reversed slashes !!! (such dumb wonderful person ! ) great lesson for me ! sorry for all bother ...
  10. good to know for the beer cheers ! no i created a console version (not windows one)
  11. yes, i even execute the LE wizard with VC++ 2008 set in and have the dlls ,shader.pak and scripts in the working dir but still errors: 1>Édition des liens en cours... 1>MSVCRTD.lib(crtexew.obj) : error LNK2019: symbole externe non résolu _WinMain@16 référencé dans la fonction ___tmainCRTStartup 1>..\sceneload.exe : fatal error LNK1120: 1 externes non résolus sorry to bother you on this, when you surely have billion other things to do...
  12. i set it like other wiki C++ tutorials, exactly like josh video tutos (was working with "camera controls" official tuto) i think i am wrong somewhere here general dir out : "..\$(ConfigurationName)" debug working dir : "../.." C++ with include dir "SDK_path/CPP" link editor: "../../$(ProjectName).exe" that's all i can see for my settings thanks for help
  13. sorry to knock at this door again but i got trouble with LE 2.31 not working on compile project Exception non gérée à 0x1014eec4 dans projetx6.exe : 0xC0000005: Violation d'accès lors de la lecture de l'emplacement 0x00000068 and stopping in engine.cpp at these lines: inline void RenderFramework(void) { leRenderFramework(); } and here my full code page: #include "engine.h" int main(int argc, char** argv) { Initialize(); RegisterAbstractPath("C:\Program Files\Leadwerks Engine SDK"); Graphics(800,600); AFilter() ; TFilter() ; TWorld world = CreateWorld() ; if (!world) { MessageBoxA(0,"Error","Failed to create world.",0); return Terminate(); } TFramework framework=CreateFramework(); TLayer layer = GetFrameworkLayer(0); TCamera cam=GetLayerCamera(layer); PositionEntity(cam,Vec3(0,0,0)); //Set Lua variable BP L=GetLuaState(); lua_pushobject(L,framework); lua_setglobal(L,"fw"); lua_pop(L,1); // Setup Initial Post Processing FX SetGodRays(1); SetHDR(1); SetSSAO(1); SetBloom(1); SetAntialias(1); SetStats(2); LoadScene("abstract::jeux6.sbx"); // Setup spectator TBody spectator=CreateBodySphere(); SetBodyMass(spectator,1); SetBodyGravityMode(spectator,0); SetBodyDamping(spectator,1.0); EntityType(spectator,3); SetBodyBuoyancyMode(spectator,0); PositionEntity(spectator,Vec3(0,5,-10)); TVec3 camrotation=Vec3(0); float mx=0; float my=0; float move=0; float strafe=0; HideMouse(); MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2); // MAIN LOOP while (!KeyHit(KEY_ESCAPE)) { mx=Curve(MouseX()-GraphicsWidth()/2,mx,6); my=Curve(MouseY()-GraphicsHeight()/2,my,6); MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2); camrotation.X=camrotation.X+my/10.0; camrotation.Y=camrotation.Y-mx/10.0; RotateEntity(cam,camrotation); move=KeyDown(KEY_W)-KeyDown(KEY_S); strafe=KeyDown(KEY_D)-KeyDown(KEY_A); TVec3 force = Vec3(strafe*10.0,0,move*10.0); force=TFormVector(force,cam,0); AddBodyForce(spectator,force); UpdateAppTime(); UpdateWorld(AppSpeed()) ; PositionEntity(cam,EntityPosition(spectator)); // Update timing and world UpdateFramework(); // Render RenderFramework(); // Send to screen Flip(0) ; } return Terminate(); } thank you for helping
  14. very great lightning ! you are shining with light michael ! thanks for sharing tweaks
  15. hey Red ! fine to see your sub in the great pond !! good job
  16. really great screenshots ! bravo ! just found too much blur, your vegetation is very realistic, but as Rick says, more variety on trees would be better (rotation and scale)
  17. + me , for very small objects it is very hard too.
  18. diedir

    time to move myself

    Thanks Maklebee for your comment. actually i am not a big fan of UU3D, we are not good friends, so recently i intended to make the video with it, but my models are really little scaled ( 2 or 3 cm) and as i don't figure how to change units in UU3D, i gave up at last because it gives me an error as opening kind of "model less than 1.0 !" no trouble more but after setting material and saving in "gmf" i found the model "flipped" in LE editor. Since i didn't try any animated model yet, i don't care about that problems but will digg it, if i must.
  19. diedir

    time to move myself

    Thanks for comments, yes you all are right, however, i never intend to finish "MY" game and sell it ... would be mad thought, i think as Pixel Perfect, just trying to have a demo level of what i wanted, would satisfy me. I am too scared (coward ?) to get involved with people who put a lot of hope in a project that i fail to pursue or finish because my family require attention or help, don't know. my first goal, generally, is not to give false hope to anyone. I am a serious guy in my life, my children are on their own now, i don't need, nor want, to be serious in a game project, i need fun with computers and time to get it, working slowly at my rhythm. On the other side, if someone really want some help that i could give, and not be scheduled every monday (because it's monday meeting), in that way, i'd be glad to help.
  20. as i am an hobbyist, i am not under pressure to make anything but roaming around here for a year and always waiting for releases... makes me uncomfortable towards efforts consented by josh since 2.3 release. Really a great shot and as i played with the new toys, i understood that a lot of time is necessary for beginners like me before producing a single workflow. I am not either young nor talented, working for myself alone (without the pressure I've got at my salaried work), but i wanted to help some new users of this great engine. So i made a (to big ?) video of the workflow i found useful from my 3D application Hexagon to LE editor. i don't know when it will be ready for posting and how or where to put it but i am still thinking on this, tonight. Well, this morning i found my video crappy but i will let the shame on me and will publish it.
  21. diedir

    Injury

    you can change your car... but watch your step though....
  22. Happy New Year to all of you people great 2010 coming ! peace
  23. lol i voted for you Gardowyr , don't have bad conscience ....
  24. just discover this topic and i was concerned too with this can confirm that after reboot problem disappear
  25. diedir

    Road bug fixed

    yep when trying to put the second node: pointing this in script:(road_node.lua) "self:ClearRoad() if target~=nil then self.roadmesh=CreateMesh(nil)"
×
×
  • Create New...