Creating a pinball type bumper

jon2sjon2s Member Posts: 40
edited November -1 in Working with GS (Mac)
I've tried a couple of different ways to create this and am curious if anyone has any interesting ideas on the subject. I have a small circle actor that I want to react to a ball just like a pinball bumper. i.e. regardless of how fast your ball is moving, when it hits the bumper it bounces off at X speed. The main issue I run across is that I can either have it hit and bounce off in the right direction but the speed varies depending on how fast you are moving when you hit it or I can have it bounce off at the right speed, but it is not bouncing in the right direction.

I even tried TShirts method he used creating an explosion effect and it nothing I try is really working well. Any suggestions are welcome.

Thanks!

Jon

Comments

  • AfterBurnettAfterBurnett Member Posts: 3,474
    If you set an attribute that told the bumber to "move to" the correct spot at a ridiculous speed, providing both ball and bumber were set to collide, that should work, shouldn't it? E.g. when the ball hits bumper, bumber (or invisible actor behind bumper) shoots up and pushes the ball away... haven't tried it but should work, no? i'd set the density pretty high too.
  • AfterBurnettAfterBurnett Member Posts: 3,474
    OR you could set the restitution really high on the bumper... that should throw the ball away from it pretty well ;)
  • A3MGA3MG Member Posts: 152
    We used restitution to vary the bumpers in Space Bump. Check out the lite version on the app store - http://itunes.apple.com/us/app/space-bump-lite/id370881128?mt=8

    On level 4, the yellow bumpers have a restitution of 1.1, the orange straight down has a restitution of 1.5, and the green moving bumpers have a restitution of 1.1

    On the full version there are other bumper types with different restitutions, some that slow the ball down, others that make it go crazy fast. I have a few "real" pinball sounds from my sfx collection if you want to try them out. email me davey at a3mg dot com
  • jon2sjon2s Member Posts: 40
    The problem with restitution is that it is dependent on the speed of the ball to determine it's velocity coming off the bumper... correct?
  • ValanValan Member, BASIC Posts: 410
    I am not a Pinball aficionado but you're talking about the powered bumpers, right?

    Maybe you need to give a rule to the ball when it collides with a bumper, so the ball accelerates away.

    An 'on rails' type method, sorry.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    When the ball hits a pop bumper, simply increase its size for a second. That is how I made the pop bumpers in the Stunt Squirrels! bonus levels.

    So, in the pop bumper:

    Rule
    When all conditions are valid:
    When Actor overlaps or collides with actor Ball
    -----Change self.Width To: self.Width+20;
    -----Change self.Height To: self.Height +20;
    -----Change Image To: [light up image]
    -----Timer
    -----After 0.2 seconds
    ----------Change self.Width To: self.Width-20;
    ----------Change self.Height To: self.Height -20;
    ----------Change Image To: [original image]
  • JGary321JGary321 Member Posts: 1,246
    What are you doing answering forum questions FMG, ur supposed to be beating SMG 2 in record time!
  • jon2sjon2s Member Posts: 40
    Bingo! Thanks firemaplegames. You know, that doesn't really roll off the tongue as easily as Bob. Thanks Bob. ;)

    That works swimmingly and is a much more elegant way of doing it.

    Thanks again.

    Jon
  • danayeldanayel Member Posts: 25
    does that change the bounce off speed or just the size?
  • firemaplegamesfiremaplegames Member Posts: 3,211
    I'm not really sure about the exact bounce off speed, but it just give the colliding object a nice kick.

    It's not just a visual change, if that is what you were asking...
Sign In or Register to comment.