Ball physics

HappyKat78HappyKat78 Member, BASIC Posts: 173
edited February 2012 in Working with GS (Mac)
Hi,

I'm drawing a line (in a bow like a ski jump) and having a 32x32 sized ball roll down it and "jump" off of the other end. The problem I have is that no matter how much I play about with the density, friction etc. of the ball, it just falls off of the jump (rather than flying through the air). Does anyone know any good tips for configuration so I can make my ball fly through the air? I've tried making density lighter, gravity lighter or heavier but I just can't seem to make it work. I'm using iphone landscape so I think I don't have a big enough run up, but hoping to somehow 'cheat' the system a little.

Anyone have any great tips here?

Thanks!

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    try to give it some sort of movement on the x to push it off and jump
  • CloudsClouds Member Posts: 1,599
    edited February 2012
    @HappyKat78

    Get rid of gravity altogether and use 'accelerate'

    Like this:

    http://www.mediafire.com/?1b29c1d9w3f1hh1

    Your iPhone screen size will have zero effect on what can be achieved with the physics engine.

  • HappyKat78HappyKat78 Member, BASIC Posts: 173
    Thanks for this. Your example works well, but doesn't seem to make any difference to my iphone example. I noticed that even if I turn the acceleration up on your example it doesn't actually make the square fly further (maybe because the increase in downward acceleration is happening the whole time so it then creates a heavier "gravity"). My example still does this and the ball falls straight off the jump still. Let me know if you have any other ideas. Thanks again for your help!
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256

    All the in game gravity is, is an accelerate behavior that effect everything. So besides being able to turn it off and adjust it with attributes, or have it only effect one object, theres no difference between the 2. So Going from game gravity to an accelerate down behavior with the same ammount, it wont effect the actor any different.

    Did you try adding some velocity on the x axis like i said?
  • MotherHooseMotherHoose Member Posts: 2,456
    edited February 2012
    extend your ramp with a transparent actor to gain some lift … as Tynan shows you

    @Tynan … thanx for another great demo … think it's time you combined those beauties into a collection!
    not only do they absolutely solve the problem … they are Fun to play with!

    and, JohnP … is giving you good advice HappyKat! if you want the actor to move/fly further, tell it so!

    @};- MH
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    http://www.mediafire.com/?e2nt05folnqsxgc

    Theres a very basic demo just to see what im talking about. It may or may not be what your after.

    Cheers
  • HappyKat78HappyKat78 Member, BASIC Posts: 173
    Thanks John! A challenge I'll have will be that the user will be able to draw different types of lines/jumps (in different directions) but I think I get the principle of what you're saying so I'll try learning from some of your code to see if I can find a good solution. Thanks for your help!
Sign In or Register to comment.