Ball gravity with bounce

ErikAuranauneErikAuranaune Member Posts: 35
edited May 2015 in Working with GS (Mac)

When creating gravity i use Acceleration 270. But i want the ball to bounce when i click it. Even if the ball is in the air, i want it to bounce like its hitting the ground. Any ideas?

I am trying to make it something like these games when the football is falling down and they click it to make it go up, and if the ball hit the ground, they loose. Something like that.

Comments

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276

    Try this in the ball actor:

    Rule:
    -When touch is pressed
    do:
    -Change attribute, self.linear velocity Y to 300.

    Mental Donkey Games
    Website - Facebook - Twitter

  • ErikAuranauneErikAuranaune Member Posts: 35

    @NipaDidIt said:
    Try this in the ball actor:

    Rule:
    -When touch is pressed
    do:
    -Change attribute, self.linear velocity Y to 300.

    Thanks, it worked. Another question please:
    How can i make the ball bounce to left and to right also and not just up and down?

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276

    That depends... Do you want the direction to be completely random when you click? Do you want it to go left and right depending on witch side of the ball you click?
    Or is there something else that alters the balls direction?

    Mental Donkey Games
    Website - Facebook - Twitter

  • ErikAuranauneErikAuranaune Member Posts: 35

    @NipaDidIt said:
    That depends... Do you want the direction to be completely random when you click? Do you want it to go left and right depending on witch side of the ball you click?
    Or is there something else that alters the balls direction?

    Maybe best if i do want it to go left and right depending on witch side of the ball i click. ?

Sign In or Register to comment.