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

    Bounce off the walls?

    Scheduled Pinned Locked Moved
    Help and Support
    3
    4
    349
    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.
    • ThisT
      This
      last edited by

      I'm trying to have a ball bounce off of all 4 sides of the screen. I've tried Collide>Propel, but it doesn't quite work. Is there a simple way to have the ball detect that it's hit the side of the screen and bounce off?

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

        Make empty objects on all four sides of the screen of which are wall objects. When you collide with an empty object, bounce by messing around with physics.

        Depending on how you're trying to achieve the bounce, you could use gravity, move by, velocity, and behaviors concerning force (among many others).

        1 Reply Last reply Reply Quote 0
        • Jack8680J
          Jack8680 @This
          last edited by Jack8680

          @This do what @GameCRAZY said and set the bounce of the empty objects to 100% and the bounce of the bouncing object to however much of the velocity you want to retain, no behaviours necessary. HyperPad is a bit weird with bounciness and seems to multiply the bounciness together, so having 100% bounciness will not bounce objects with 0% bounciness.

          ThisT 1 Reply Last reply Reply Quote 0
          • ThisT
            This @Jack8680
            last edited by

            @Jack8680 Thanks! Didn't realize I had to set bounciness.

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