Jump to content

Andy Gilbert

Members
  • Posts

    533
  • Joined

  • Last visited

Everything posted by Andy Gilbert

  1. If your referring to the method i posted then it was a combination of the Lua guide and trial And error. Otherwise I'm not sure bout paratoxic and although I'm sure it will work I haven't tried it. Thanks Andy
  2. Done it: for entity in iterate(fw.main.world.entities) do if entity:GetKey("name")=="myModel_1" then myModel = entity end end Andy
  3. HI, in the "driver" example, when you run the game from within the editor, the script creates the car and places it ETC. This sort of defeats the object of the editor. So my question is, how can i place an object in the editor that has a lua script, then from the "game" script find that object and do stuff with it? I have read the lua guide, but it doesnt explain it in there, unless ive missed it. thanks Andy
  4. Ok, well the code looks the same? The model in your case, does the "chassis" have wheels? or is it just the chassis? Does the "chassis" have bones? If so are the bones only for locating where the pivots should be? Thanks Andy
  5. Hi, going back to this, do the wheel "have" to be seperate? Im a litle confused, the monster truck model has has wheels AND seperate wheels? The Viperscout lua script refers to wheels that dont exist? Ive made a "box" model car and apply the same script, the car moves and acts like a car, but no wheels turn or spin. Whats the general "rules" to the vehicle, as there seems to be very little docs on the vehicles. Thanks Andy
  6. HI Pixel, you have thrown me there? the viperscout code is the same, and the monstertruck has a phy file? Is there something else needed? Thanks Andy
  7. Im trying to impliment my own car, but when ever i change the drive.lua game script to another (e.g. the included monster truck) when i "play" the truck appears in front of me and that it, it doesnt fall to the ground and let me drive, or do anythine just the mouse look works. Change this back to viperscout and works fine? Anyone have any idea why? Thanks Andy
  8. Hi, what version does the current LE2 build use? Also, is it possible or a big job to ignore the build in NGD and somehow integrate the latest version of NGD? Thanks Andy
  9. ahh that seems good, so does this go back to my original question? All the physics code can go inside that physicshook function? Thanks Andy
  10. Does anyone know if the above command works in lua, or is meant to work? Thanks Andy
  11. Without trying the way you have I'm not sure about the answer. But something I could suggest to try is to export it has a map file from 3d world studio and then try to open in in torque constructor ( free from torques website) then save it out from there as a dif. As for leadwerks not showing the model correctly may be down to the evaluation version and the exported type? Did you save it straight out to a gmf file? Andy
  12. Hi, just wondering how i stop the camera from jerking, or maybe the body? from jerking whilst moving at speed? When i say speed its not super sonic, just moving. I am simply setting the camera position to the body's position with an offset. Thanks Andy
  13. Hi, what do you mean by between 2 frames? and the flip 0? Thanks Andy
  14. Ahh I see, is this a bug that need reporting? thanks Andy
  15. Infact, i cannot get any "paranted" bodies properties such as velocity ETC? Is this a bug? Thanks Andy
  16. I seem to be able to get nothing from a CreateBodyPivot usin lua? I create the pivot, set its parent and then when i try to get the vlocity, i just get 0? Can any one confirm this? Thanks Andy
  17. Im trying to calculate the velocity at a point on a body which is rotating. The equation is simple: P be the local position/offset in global space, V, the linear velocity W and angular velocity of the body Vf = V + cross (W, P) So in LE i do this: P = Vec3(5,0,0) V = GetBodyVelocity(body,1) W = GetBodyOmega(body,1) lvel = cross(bodyav,TFormPoint(offset,body,nil)) vf = AddVec(bodyV,lvel) This caused crazy results and doesnt work, as soon as the body starts to rotate vf results in an axis having a massive number. So, ive been told this is because im transforming the point and not rotating it and suggested: (not LE code) P = Vec3(5,0,0) V = GetBodyVelocity(body,1) W = GetBodyOmega(body,1) globalOffset = TransformVector (bodyMatrix,P) - bodyMatrix.GetPosition() lvel = cross(bodyav,globalOffset) vf = AddVec(bodyV,lvel) Does this make any more sense? Thanks Andy
  18. Hi, im having a few issues regarding some physics and in talks with Somone who is helping me out, he is suggesting that in order to achive the result i need to Rotate the vector with the body matrix? P = RotateVector (vehicle matrix, CP) <-- no LE command (its what he suggested) After playing around more and having no luck I questioning it again and it was advised again that its because i am transforming the vector and not rotating it. And suggested i do somthing like this: pg = TransformVector (bodyMatrix, p) Anyone know what he means by rotate the vector with the bodymatix? Is this somthing i can do using TFormVector? Sorry if this all sounds a bit wishy washy. Thanks Andy
  19. Hi, just wondering how this can be done with lua? Cant seem to get the command to work? Thanks Andy
  20. Hi, whats the simplist way to add some wheels to a physics object? Im not in need of suspension or anything like what, just so an object can roll. Thanks Andy
  21. Thanks for this, i actually only have 1 physics entity, so should be to big a problem to impliment. Thanks Andy
  22. Hi, Im wanting to put all my physics calculations into a physics fixed update function based on the callback that the document present im a but unsure how i do this as it has a parameter for an entity? Can i not have a single function that does all the physics routines every physics update? Thanks Andy
  23. HI, im trying to port some code over and one of the functions is Quaternion.Slerp(). Is there such a function witin leadwerks? Thanks Andy
  24. Hi elcoo, although i dont have the direct answer I have done many many attempts at flight simulator dynamics with leadwerks. Whilst i found it difficult, I did learn alot and realised (got told ) to get more precise physics like you are trying you need to calculate the forces differently. You may already be doing this as ive not seen your code, but you need to calculate the forces apply at different points of your model (so each wing, tail, etc...) and also the drag and then calcualte the total force acting on the plane and apply that single force. I was trying all sorts with using AddBodyForceAtPoint and others but never had any luck, until i finally got my head around it. I think if you search there will be a few post of mine regardin this same issue, aswell as many conversation with julio on the newton game dynamics forum. Although ive not had time to pursue this, this is the last "glider" style dynamics i achive in leadwerks. Thanks Andy
×
×
  • Create New...