Bouncing ball: Noobish gravity thing
Author: | W3R3W00F
|
Submitted: | 10th January, 2009
|
Views: | 5233
| Rated: |
|
|
Alright, I'm sure everybody knows how to do this... but for the very few of you who don't know how to make a rubber ball like effect, this article will show you how.
And please, bear with me. I'm still have alot to learn about MMF2.
Alrighty! First, make an active object, rename it to "ball" (Without the quotation marks tho.), and set it to Pinball ball movement.
In the event editor, add the condition...
("ball") leaves the play area
Now add the actions...
-Bounce
-set gravity to Gravity ("ball")+X
-set speed to Speed ("ball")-X
The ball will decrease speed and increase gravity as it bounces, however... it will continue to bounce unless you add this condition...
Speed of ("ball") < X
+("ball") leaves the play area on the bottom
Add the action...
-Stop
The second condition makes sure the ball touches the ground before it stops. It adds realism to the ball.
If you wanted to randomize the bounce, it's just as easy. Add ze condition...
("ball") leaves the play area
And then ze actions...
-Bounce
-set gravity to Gravity ("ball")+X
-set speed to Speed ("ball")-X
-set direction to random(32)
Easy squeezy, lemon peasy. Yes I know I'm a Noobish/Novice clicker. It means I can't write anything too complex. Enjoy your absolutely wonderful rubber ball. Hope this helped someone.
|
|
W3R3W00FDrum and Bass Fueled Psycho Registered 08/11/2008
Points 374
|