I have some balls which are arranged in a circle. I draw them to screen with the following:
I want there to be a sort of burst effect which causes the balls to burst outward then return inward to the center of the screen.
I thought I could use something like this.
It craetes a nice smooth movement inwards but then it stops and hangs.
Any ideas on how I can proceed?
Function drawBalls() For Local b:ball = EachIn ballList SetRotation(BallRotationAngle) DrawImage balls,b.xpos+BallXoffSet+Sin(b.angle)*distanceFromCenter,.. b.ypos+BallYoffSet+Cos(b.angle)*distanceFromCenter,b.ballFrame SetRotation(0) Next End Function
I want there to be a sort of burst effect which causes the balls to burst outward then return inward to the center of the screen.
I thought I could use something like this.
Function testBurst() Local temp:Float = distancefromcenter BurstDistance = 100 If KeyDown(KEY_SPACE) distanceFromCenter = Sin(temp)*temp temp:+1 If temp <=0 Then temp = 360 EndIf DrawText "temp = " +temp,0,0 End Function
It craetes a nice smooth movement inwards but then it stops and hangs.
Any ideas on how I can proceed?