Creating a pinball type bumper
jon2s
Member Posts: 40
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
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
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
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.
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]
That works swimmingly and is a much more elegant way of doing it.
Thanks again.
Jon
It's not just a visual change, if that is what you were asking...