Ball continuously bounce against walls

mfinneymfinney Member Posts: 13
edited November -1 in Working with GS (Mac)
I have invisible actors as walls on the right and left of the screen. I just want the ball actor to continuously bounce back and fourth against the walls on the x-axis. I have the behavior set up so when ball actor collides with wall left or right velocity changes. Works great, but after two bounces the ball goes off screen and doesn't return.

Please help!

Comments

  • b2iscoolb2iscool Member Posts: 135
    Best way i found is to have either the same actor for the walls or have your walls in the same tag if thats not possible. Change your balls linear velocity x to like 100 or whatever you want. Place your ball to the right of your left wall and make a rule that when ball overlaps or collides with wall change linear velocity x to -linearvelocityx and thats it. http://gamesalad.com/game/13916 here is the best way and you can also make it accelerate by making it *1.5
  • mfinneymfinney Member Posts: 13
    Thanks b2!
  • b2iscoolb2iscool Member Posts: 135
    No problem if you need any more help just mssg me!

    peace
Sign In or Register to comment.