Ball speed control?

mmmodelmmmodel Member Posts: 46
edited April 2013 in Working with GS (Mac)
Hello guys, here i'm again with another doubt.
How i can control my ball speed on pong game because the ball was so much speed and sometimes he disappears.
I tried to put on the ball actor the ball direction rule with the change velocity but in the speed i tried the random(min,max) but did not worked the ball still increase the speed and disappears.
Anyone understand what is happening?
Thanks.

Comments

  • mmmodelmmmodel Member Posts: 46
    And sometimes the ball still in the same angle and this f***** the game too.
    because the speed increase more and more and bug the game :(
  • mmmodelmmmodel Member Posts: 46
    No one? :((
  • PaxPaxPaxPax Member Posts: 106
    Curious. Are you using change velocity with the direction set up as 'random' and then a value for speed - something like 300? This should work. You can also go into the actor attribute and under 'motion' set up a max speed(key in the max speed, 300 or something and then tick the max speed box)-but I don't think you should need to do this if change velocity is set up as above.

    Cheers
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    Yeah, it really depends on how you've set up your behaviors for the motion. I have a pong game where I use the balls velocity, so you can keep it set to a certain speed if you want like:

    on the ball:

    change attribute linear velocity.Y to 300 (or whatever) whenever it bounces off a surface.
  • mmmodelmmmodel Member Posts: 46
    I did the ball direction with change velocity = direction random(-45,45) speed 300 and one otherwise random(135,225) with speed 300 but the ball still increase the speed and sometimes disappears i tried the change attribute too but did not work, i think the error is in the physics of the ball, maybe i did the density and bounciness with the wrong value, what you guys think about? :-/
  • mmmodelmmmodel Member Posts: 46
    Under motion of the ball i tried to set the max speed to 300 and seems better, but not perfect uaehuaehuae
  • mmmodelmmmodel Member Posts: 46
    but the angle of the ball sometimes still in the center forever and ever and this is another bad bug but i did not understand because the ball has the random for the angle, what i can do? =/
  • mmmodelmmmodel Member Posts: 46
    i fixed the problem about the ball in the center forever and ever xD
  • mmmodelmmmodel Member Posts: 46
    yeahh, i fixed everything thanks for the support guys, but in the motion i did the max speed 500 and apply the max speed and the density to 0,1 and bounciness to 1,1 and worked xD
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
Sign In or Register to comment.