Ball bouncing effects
|
Ever wanted to know how to make a ball bounce realistically?Well this is what this article is here for.To teach people special effects.
I recommend putting all your events into groups such as bouncing,Falling etc. for more control.
Ok we'll start with the ball bouncing effect.
Pretty simple.
Since im assuming the ball is gonna start in the air
do this event first.
Ball is over and obstacle in the background negated
+Ball flag 0 is off
+Ball flag 1 is off
>Set ball flag one on
Ball flag one is on + Ball is over an obstacle in the background negated
Set ball position y to y+Value a ball
Add 1 to ball value a
Now for bouncing
Ball hits backdrop+Ball Flag one is on
Set ball value a to 0
Set Ball Flag 1 Off
Set ball flag 0 on
Set ball value b to (x)
(x is how high you want the ball to go the higher the number the higher the bounce.I recommend around 10-15)
Ball value b is greater than 0
Sub one to balls value b
Set ball y to y-Value b Ball
Only one action when event loops
+ ball value b=0
Set ball flag zero off
That would make an everlasting bounce effect.
Now for the realistic bounce effect (bouncing lower each time until no bounce at all)
Do all the above except start of level or whatever action
set ball value c to height you want to start at
Then collision between ball and backdrop
do the eventing in that part then add
set ball value B to value c
Then sub however much you want from value c(the amount you want the ball to bounce lower.
I will have more articles soon.
The reason i didnt post more is because im worried about the internet cutting off.Well ill be sure to post some more.Hope this can help somebody .
|
|
|