Bouncing ball in a breakout game.

skush97skush97 Member Posts: 4
edited December 2012 in Working with GS (Mac)
Hi, I'm brand new to GameSalad, and I have made a simple breakout game, but I have one problem, the ball is too slow, and it never speeds up. I'm wondering if there is a way to accelerate the ball in the direction that it is already moving in, or if I can make it go faster right off the start. I used a gravity of 5 to drop the ball at the start, but if I increase gravity, the game doesn't work correctly, is there a better way to start it?

Comments

  • skush97skush97 Member Posts: 4
    I think I found what I want to do: http://forums.gamesalad.com/discussion/28986/attribute-to-change-actor-velocity but when I tried it, the direction still changed.
  • CluvCluv Member Posts: 229
    I did something similar, but I used bounciness of the objects to speed up the ball. Bounciness is a physics attribute in the object. I have the bounciness set to something like .5 and you will see the object go faster each time it hits an object - just a thought.
  • skush97skush97 Member Posts: 4
    that sounds perfect, however, I already have it set to 2, shouldn't it be getting really fast? or am I totally misunderstanding the bounciness attribute?
  • CluvCluv Member Posts: 229
    I think it depends on the density of the object bouncing off of it as well. Try changing the density of both objects and see if it makes the difference you want.
  • skush97skush97 Member Posts: 4
    I played around with the density, that didn't work either, but I have an idea. Velocity is a vector, meaning it has a magnitude (speed) and a direction, all I want to do is change the magnitude (speed), I noticed that gamesalad has a magnitude(x,y) function, is could this be what I'm looking for?
  • skush97skush97 Member Posts: 4
    This works

    I have a self attribute "current aov", which I constrained to
    VectorToAngle(self.Motion.Linear Velocity.X,self.Motion.Linear Velocity.Y)

    Then, when the speedup bonus applies, I change the max speed to 500 and added the rule

    Change Velocity
    Direction: self.current aov
    speed: 500
Sign In or Register to comment.