Bouncing ball physics (Written by:Moogle)
 
process ball()

private
ballspeed = 10;

begin

//insert graph, startvalues of variables and other blabla

loop
if(x > 320 or x < 0)
 angle = -angle;
end
if(y > 240 or y < 0)
 angle = -angle + 180000;
end

advance(ballspeed);
frame;
end

end

  Back to Snippets

Home : Start Here : Sources : Snippets : Tutorials : Faq's : Links : Contact