Jump to content

bouncing ball maximum height


datahandler
 Share

Recommended Posts

Let's say I have 3 balls in a game: large, medium, small.

I want each of these balls to bounce to a maximum height (defined by me) but without bouncing at the top. Simply to arc naturally to the maximum height, then start falling again.

Is there a straightforward way to accomplish this?

Link to comment
Share on other sites

Thank you Shb and samid737 for replying. Sorry if I did not explain myself very well.

Basically, I created a javascript game (one level only) that I want to convert and continue to develop using Phaser (Arcade physics).

The game is here

Each ball spawned initially moves upwards before arcing and falling again.

After the first bounce, the ball will continue to bounce at a fixed height determined by its type (large, medium etc). Note. the height after the first bounce may be lower than the balls initial height depending on where it was spawned.

Getting a ball to bounce in Phaser is straightforward but I cannot work out how to keep bounce height fixed after the initial bounce. WIth my current attempt, the height the ball bounces is determined by the height from which it was spawned.

I hope this makes more sense.

 

Link to comment
Share on other sites

  • 2 weeks later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...