Jump to content

Andy Gilbert

Members
  • Posts

    533
  • Joined

  • Last visited

Posts posted by Andy Gilbert

  1. I have actually given up until further notice, Its just really getting on my nerves trying to find the issue when its obviously in the core somwhere.

     

    I hate having to sound like im moaning, but i have give it anohter 3 - 4 hours this morning trying to get what seems simple torques and forces to act "normal" yet they dont, it feels like you've cracked it then all of sudden the forces go mad and send my objects off on a tagent somewhere, im not doing any special maths or trickery, just simplly adding forces and torques.

     

    To me its not useable in any way at the moment so im not wasting any more hours on it until its been looked at.

     

    Andy

    • Upvote 1
  2. After spending hours trying to find why i was getting bezare results i have found that it appears the X axis of the AddTorque function is always global despite setting it to local, other axis seem fine. Unless im doing it wrong.

     

    Attatch a script to some CSG and add this then run and spin, you will see:

     

    function Script:Start()
    self.entity:SetGravityMode(false)
    end
    
    function Script:UpdatePhysics()
    local window=Window:GetCurrent()
    
    local xaxis = ((window:KeyDown(Key.Up) and 1 or 0) - (window:KeyDown(Key.Down) and 1 or 0))
    local zaxis = ((window:KeyDown(Key.Left) and 1 or 0) - (window:KeyDown(Key.Right) and 1 or 0))
    local yaxis = ((window:KeyDown(Key.Z) and 1 or 0) - (window:KeyDown(Key.X) and 1 or 0))
    
    torque = Vec3(xaxis*50,yaxis*50,zaxis*50)
    self.entity:AddTorque(torque,false)
    end

     

    EDIT: Im not sure its JUST the X axis, if its not that the X axis is always global then something very strange is happening with its local coordinates

     

    Change the AddTorque above to:

     

    self.entity:AddTorque(Transform:Vector(torque,self.entity,nil))

     

    And it appears to works fine

     

    EDIT2: adding forces also results in very bezare results, physics has some real issues going off.

     

    Andy

  3. Well, i openened Leadwerks today and went to move around using WASD and got nothing, so i restarted and still got nothing. I then started to comnvince myself that maybe it never did have WASD and im just to used to 3D modeling where i use WASD but i have since looked at the user guide and that also stated WASP or Arrow keys but ive lost the ability with both?

     

    Why could this be?

     

    Thanks

    Andy

  4. And what engine did you have smooth flying physics in? As Ive tried a few including unity, torque and UDK and all required already developed flight libraries or you needed to develop your own, just like leadwerks.

     

    Anyway, hope you manage to do it. By all means have a good go, I learnt the most I ever did in regard to physics when I wrote my flight physics in le2.

     

    Andy

  5. Hi yougroove. If you go down the physics root then be prepared for a lot of maths and understanding of airfoil dynamics. I have written many flight physics in leadwerks, some nit so good and one really good but that had a lot of work put into it. If you want arcade flight then I wouldn't use physics. The initial problem you will face is the problem of drag.

     

    If you want basic fligh just simulate this using move and rotate and curve the values to make it smooth.

     

    I am actually porting my flight physics from le2 to le3 although with current le3 physics I am running into issues.

     

    Andy

  6. Just my 2 pence worth, i do alot in marketing within my full-time job and at the moment i would say animation (especially in logos) is "not in". Thats not to say you shouldnt use, at the end of the day you use what you like, but the current trend seems clean & simple.

     

    Although if used as an "intro" to a game (a logo splash) i dont think theres anything wrong in using animation, but scripted png's would be better. But for else where as static content (web ETC) i would not use an animated logo.

     

    Andy

    • Upvote 1
  7. The way the ball keeps up to the wall is simply a small amount of force applied on the z axis. This is not enough to keep it on when you over do it or go in front of the vent etc.

     

    Thanks again for the comments.

     

    Andy

  8. Thanks aggror, it wasnt untill after i started this game that I thought i would look around the net to see if there was similer iphone games (i know the wrong way around, research first!!) anyway, via google i came across crazy machines 2 and noticed it looked like mine, but alot better obviously!

     

    But up until then i hadnt actually heard it, but it does look fun! :)

     

    Thanks for comments.

    Andy

  9. Some good advice Rick, nice to know you managed and with more kids than me! smile.png Ill take it on board and see if I can get another Leadwerks game in the store. Would be nice to eventually have my name on there amongst the other.... 1000000+ devs smile.png

     

    Andy

    • Upvote 2
  10. Its like eveything else... i have too many other things going off that take my attention away, especially when your programming full time as I do, so to come home and then continue looking a computer code, when you have a family and other hobbies, its difficult!

     

    Rick thanks, much appriciated! You did very well to release your game alone, credit to you!

     

    Andy

  11. Probably my biggest difficulty out of the whole game development Rick, I always feel like ive let myself down about it too. But it is hard, i think even with just 1 other person on board would help keep the moral alive!

     

    Andy

  12. Ive added a game i was working on, and as explined in the asset store, i have currently run out of time and interest so thought I would simply show its progress.

     

    Its unfished and parts not working, but from what i remember it works enough for you to do the levels.

     

    Its a ball physics game, where you have to roll the ball into the basket, but also get as many of the 3 stars as you can. There is currently 5 working levels.

     

    You only need to use left and right arrows in game and for menu.

     

    Have fun.

     

    I will also add, credit to Leadwerks 3 as from having this idea, i found it very easy to impliment using leadwerks and lua!

     

    EDIT: Ive just realised this may have music playing, which is something i last worked on when i was working on it, and i forgot. So sorry if annoying!

     

    Andy

    post-72-0-65258900-1375268602_thumb.png

    • Upvote 3
  13. Can I just say, as yougroove I understand the fustration and have in the past seen you have had lots of issues with leadwerks and collisions, but using the process that I was always tought has never failed me. And its simple, regardless of the model, you also model (or commision someone to model) a BASIC collision model for you use, or in leadwerks convert to a polymesh. Its easy...

     

    The basic model really is basic, no details just block out so it covers most of the model. This means you dont have to worry about models you purchase, make or download.

     

    I know not everyone can model, but creating a collision model is not complex modelling, its covered on nearly every "The Hello World of modelling" tutorial on the internet for which im sure there is one for every modelling package out there.

     

    I dont think its always down to the engine, or leadwerks in this case. Leadwerks needs a collsion model, if your model is basic enough then you can try to use that, otherwise you model one.

     

    Andy

  14. In the docs it says for GetPointVelocity

     

    This function gets entity's velocity at a specific point, in global or local space.

     

    http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/entity/getpointvelocity-r758

     

    But then doesnt mention it in the syntax or parameters and ive tried it which results with an error in the function?

     

    So is there a parameter for local and global?

     

    Thanks

    Andy

  15. I'm reposting this as the admin response doesn't really correspond to the bug. I am referring to parenting models then attatching scripts. Not just movements in the editor. But I can no longer reply to my original thread so I'm reposting...

     

    When you parent an object in the editor all works fine, in the editor. But if you attatch a script to move the parent or child only the one you set to move atually moves, the parent or child does not.

     

    BUT if you parent a model to a camera, then attatch a script to the camera that moves it, the child moves too.

     

    So it works for some but not for others? Which one should it be?

     

    Thread-> http://www.leadwerks.com/werkspace/topic/7198-parenting-in-editor/

     

    Andy

  16. Simply adding the force to the cube (car) using AddForce in local coordinates will do this. I have a very simple car setup using forces and drag, but if you simply want to apply a force and keep its rotation then do what your doing alredy apply a force but not global. To turn the cube use addTorque. Don't use turn or rotate. You cannot mix physics with normal positioning.

     

    AddForce(x,y,z) so use z for example.

     

    Then Make it so when left or right key is down you AddTorque(0,val,0)

     

    Andy

×
×
  • Create New...