How do i pick up and throw with bounce!

0 favourites
  • 7 posts
From the Asset Store
Bouncing ball
$9.99 USD
Template for a bouncing ball game, fully documented in comments and video
  • Hey there! ^_^

    I have a feeling that my question which i have been searching for hours has a very easy solution, but i want to try and to create where, you as in the main character can pick up a ball and throw it with bounces, without it breaking, and repeat?

    Ie, pick it up, throw it with a nice bullet/physics engine where it bounces 2-3 times, and after it has stopped bouncing, pick it up again and repeat?

    Thanks in advance! ^_^

  • There are several ways to do this however the easiest is to add the Physics behavior to object and then increase its Elasticity value in the behavior settings. Play with this and with the friction setting until you get the effect you want. The elasticity values and friction value of any other objects the ball might interact with will also play a factor.

  • Oh and for the pick up part - just add an image point to your character and then move the ball to that image point when the character is within a few pixels of the ball. To release the ball you will need to have some sort of interaction...such as a touch or whatever that you will use to toggle the "holding" state to untrue and use a physics impulse to throw the ball in whatever direction you want.

    If this is unclear, I can make a quick example for you later.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Oh and for the pick up part - just add an image point to your character and then move the ball to that image point when the character is within a few pixels of the ball. To release the ball you will need to have some sort of interaction...such as a touch or whatever that you will use to toggle the "holding" state to untrue and use a physics impulse to throw the ball in whatever direction you want.

    If this is unclear, I can make a quick example for you later.

    Hey man, thank you so much for taking your time to explain this! ^_^

    I couldnt ask you for a capx, you have already taken your time to answer me here, though i dont think i have seen any tutorial for this as i have been searching for it for hours (or i just missed it...)

    So perhaps if you do an example, it can be up in the tutorial section for others to learn ^_^

    Thank you for your time.

  • Yeh i cant get it to work either, any capx or examples of this? xD

  • Here's a quick and dirty example. Use the arrow keys to move the blue "character" towards the ball. Once the character is close to the ball, the character will automatically pick the ball up. Throw the ball by pressing the space bar and the character will throw the ball and it will bounce off the ground. Hope this helps.

  • Here's a quick and dirty example. Use the arrow keys to move the blue "character" towards the ball. Once the character is close to the ball, the character will automatically pick the ball up. Throw the ball by pressing the space bar and the character will throw the ball and it will bounce off the ground. Hope this helps.

    Thanks alot for the help man! ^_^

    Really appreciated!!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)