logo hyperPad Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Login

    "Breakout" style physics for ball

    Scheduled Pinned Locked Moved
    Help and Support
    3
    6
    259
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      Justin Hattaway
      last edited by

      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?

      iTap DevelopmentI 1 Reply Last reply Reply Quote 0
      • GameCRAZYG
        GameCRAZY
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • iTap DevelopmentI
          iTap Development @Justin Hattaway
          last edited by

          @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.

          J 1 Reply Last reply Reply Quote 0
          • J
            Justin Hattaway @iTap Development
            last edited by

            @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).

            1 Reply Last reply Reply Quote 0
            • GameCRAZYG
              GameCRAZY
              last edited by

              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!

              J 1 Reply Last reply Reply Quote 0
              • J
                Justin Hattaway @GameCRAZY
                last edited by

                @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. =]

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post