"Breakout" style physics for ball
-
Trying to make the ball bounce and travel forever. I know if there is no gravity, no air resistance, and no friction the ball should travel forever. I have it set up this way but the ball always slows down. Does someone have a solution for this or am I encountering a bug?
-
You should set a timer, and constantly change the gravity of the ball. That way it will always move around in random directions. Depending on the effect you are looking for, you can experiment with random number values for speed and different timer values for delays. This only a basis, and you can do a lot with this type of set-up.
-
@Justin-Hattaway if you want a ball to bounce forever, set the bounce property to 100% for the ball and the objects it bounces off of.
-
@iTap-Development Thanks, I figured it out soon after asking. That's all it took! I didn't realize those properties were in %'s.
This is my first time working with the hyperpad app, I still use gamepress (for fun).
-
Oh, I didn't realize that's what you were looking for. Sorry about that; my method will have you going in random directions all over the screen, but it's really useful anyway!
Welcome to Hyperpad!
-
@GameCRAZY That is fine, I am making a breakout game (for fun) and your suggestion made me think to have certain bricks in the game that adjust the balls speed when broken. So far I have made regenerating bricks and ball/paddle power-ups. I'm thinking next will be a paddle health bar. =]