Jump to content

Andy Gilbert

Members
  • Posts

    533
  • Joined

  • Last visited

Everything posted by Andy Gilbert

  1. Here is a video showing what im experiencing. You can see the code in background, theres nothng more to it. Note: You will need to watch full screen to see the value So the value i labled to "keep an eye on" is simply a value increased with the "up" key, by 0.5 increments. But what you will notice is it takes 80 to lift the box off the ground, then near the end only a value of around 25/30 is needed to make excert the object up? Whats changed? Edit: I have raised the camera higher and it appears as though the object and force acts correctly untill it rises higher than the camera, then it starts going daft? Why would this be? Here is another video to show this: Similer Video as the other, except the camera is higher and the body seems to react fine whilst under the camera. To lift the object off the ground its around 70, if i lower below 70 it starts to drop, if i increase above 70 it starts to rise. But when the object is above the camera the force value to do the above is about 20?? Andy
  2. But why does this force thats needed to make the object "rise" vary with height??? I understand that it will keep accelerating if greater than gravity, but why if the value to make the object rise against gravity is 65 from the ground, does it change to 20 when higher, or its only 5 when even higher? Andy
  3. Ok, ive been pulling my hauir out at an issue and so to test i have gone back and created the most basic script and i still get the issue. If i have a bodybox, and i slowly increase an "up" force in global space, (so it doesnt matter what rotation it is, the force is always up) the box will slowly lift up and then accelerate upwards, quite rapidly? Well im not increasing more force, im using "setforce", not "addforce". I just dont get it, it lifts up very slowly, then after a short while will start to accelerate and then "shoot" off ub into oblivion? And then it acts as if the "higher" the object the less force is needed to keep it up, until if high enough a force of 0 WONT left the object fall back down??? Edit: Ive done even more playing and found it actually un usable and wonder how ive actually managed to use it in the past, i cant undestand whats going on?? Although these are arbitrary values. I can Increase my up force by 0.5 i can get the object to lift off slowly at 65. It will then slowly start to rise but accelerating, if i decrease to a point where the object starts just start to fall its MUCH lower that 65, in fact if i lower it to say 40 it will still accerlate up, (even though it only just lifted off the ground at 65) if i ACTUALLY manage to get to stop and start to fall slowly, this value is now much lower, around 15 - 25? When before it was 65 and it appears that the higher i go, the LESS force is needed to make the body move upwards, to a point where i can get it to return to the ground unless an OPPOSITE force is applied, almost like gravity has vanaished. Thanks Andy
  4. Ahh i see, are we ever to see v5.2 in leadwerks. Thanks Andy
  5. Hi, Lua allows you to call a function with n number of arguments, and these get stored inside a hidden table labled "arg". to do so you add "..." bewtween the (). So function foo(...) but i cannot seem to get this working in leadwerks lua? Just errors saying the global variable arg is nil? http://www.lua.org/pil/5.2.html Thanks Andy
  6. Just wondering if you have had any luck Rick? Thanks Andy
  7. Ahh thats it, i remember it being along them lines. Ok Thanks ill give it a go. Andy
  8. I remember posting a while ago about 3D lines and after some discussion someone showed me a simple way to show a 2D line as 3D. But i cant remember how and cant find the post, think it was lost that time. Does any know how i can show a 3D line but just using the 2D line commands. Its only for debugging. Thanks Andy
  9. That sounds good, all helps when you can visualise changes as you do them. Thanks Andy
  10. Thanks josh, that really is simple. I really need to get my head around them commands and how they work. Thanks Andy
  11. Hi, ive covered on this before but i never managed to work it out but now coming back to it. It sounds simple but it appears not so (for me anyway), i want to get the "facing direction vector" of a body/model. Im trying to calculate the angle of attack. To do this you need the objects velocity and the objects front direction vector. On the newton forum theres a few ways to it but they get the "facing direction" by getting the "front" of the matrix. dMatrix planeGlobalMatrix; NewtonBodyGetMatrix (planeBody, (float*)&planeGlobalMatrix); dVector facingUnit = planeGlobalMatrix.m_front; // first vector, = x axis I can easily get an "angle value", z angle of the object gives me a rotation angle, but to do the equation to solve AoA you need to do the dot product of the veloicty vector and facing vector. And getting the rotation value of Z doesnt give me a facing vector. In easier terms i want to find the angle between two vectors, one i have (object velocity) the other (facing vector) i dont. Anyone know how to solve this? Thanks Andy
  12. Thanks for the replies, I see now how doing the above does make it alot easier so will give that a go. Thanks Andy
  13. When you say seperate entitiys, that would seperate gmf's, so the bike example would be 2 .gmf's? (frame and wheel x 2) and then you use lua two make them a "model"? Thanks Andy
  14. Hi Josh, a group i refer to is maybe a child? Im not sure what you call them but in most 3D model packages there groups, and when i convert them to a GMF there stilll there named the same so i presumed still groups, but maybe a selection of verts? Either way, i can find this group/set/selection of verts by its name using findchild and then i can rotate as i wish. But thats fine, if the origin is the center of the the child i want to rotate. but like i said in the past threads, what i want two or 3 groups i want to rotate. Lets say like a bike, how would i rotate both wheels around there own axis, you cant have the origin center of both wheels? Thanks Andy
  15. Rick this sounds spot on, cant thank you enough for giving this a go. Much appriciated. Thanks Andy
  16. Hmm not a bad idea Clackdor but yes i think it would have issue with multiple spinning verts. I can only assume the correct way to do this is to have any parts you want to move or spin to be on bones, then yo get full control over them. Ill have to look into why models using the skin shader dissapear. Thanks Andy
  17. HI Clackdor, thanks yes that is the other option, but some models might have more than one spinny thing (not just refering to the fan) and i wanted to try keep them as a single model as aposed to have lots of "parts" of the model that i then i have script together. I made the model which is why the origin is where it is, i could easily change it to the fan, but what about models with more than one fan? Thanks Andy
  18. Hi, thanks for the replies. I guess the skinning / bone idea rick is the solution and the one i first tried, the only reason im going down this road is becasue it appears my computer that im currentl working on that has a "intel HD 2000" graphics adapater makes the model dissapear when i use the "skin" shader, meaning i cant currently do it that way (well it will make it very hard lol) So, thought this might eba work around. Any ideas why models dissapear when i use the skin shader? Thanks Andy
  19. Hi, im trying to get my head around the TFormVector and TFormPoint as im sure thats what i need to do in order to get my code to work. I know this might seem simple, but i just dont quite get it at the moment so need a little help. To save me trying to explain ive made a quick diagram of my problem. The fan thing in the image is one model, this contains two groups, "frame" and "fan" and what i do in code is find the "fan" child and make it into an entity, i then want to rotate it like a fan would. But as you might of guessed it does, it rotates around the origin of the model. What do i need to do in order to make it rotate arounds an axis of its own? Thanks Andy
  20. Hi rick, that would really appreciated. I dont mind a limit, I'm happy with just 1 working. if there is anything I can do to help then let me know. Thanks rick, keep me updated on how u get on. And thanks gamecreator for making your code available. Andy.
  21. Hi, I've not seen that and windows is fine but is this for lua? Thanks Andy
  22. Ahh thanks Rick, ok ill have a look. I dont quite understand how to "port" to lua else i would do it, ive tried looking into it but struggled to find out good info about doing so or even how i go about making extensions for lua? Any good resources on this? Thanks Andy
  23. HI Diedir. yes its your demo, so this will only work with a Xbox gamepad? Any chace it could be modified to see any gamepad/joystick? Thanks Andy
  24. Hi, just wondering if anyone has managed to get the lua joystick module to work? Ive downloaded but just receive the Joystick 0 Not found => EXITnotification despite having a PC gamepad plugged in a working. I find it so fustrating theres no way of having a joystick working with lua?? Thanks Andy
×
×
  • Create New...