Ball Physics

VmlwebVmlweb Member Posts: 427
edited November -1 in Working with GS (Mac)
Hey,

How can I make a circle actor bounce up and down forever at the same height and if I move the ball left or right the bounce height will remain the same. If I bounce it onto a block then the height will increase with the same amount as the ball.
If anyone could help me that would be great.

Thanks

Comments

  • KamazarKamazar Member Posts: 287
    The restitution of the ball and the platform it's bouncing on have to add up to 1. Pretty sure that should do the trick.
  • VmlwebVmlweb Member Posts: 427
    I put them 0.5 each and it stopped after 2-3 bounces.

    I put the ball up to 1 and the platform to 0 and it did keep bouncing but it kept on getting higher and lower. Then when I changed the velocity to move it left or right it completely slowed down
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    try putting both at .5, and make friction 0?
  • VmlwebVmlweb Member Posts: 427
    I tried that
    didn't work
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    what if they were both at 1? I havn't played much with the whole bouncing physics yet, so I'm just guessing here :)
  • EastboundEastbound Member, BASIC Posts: 1,074
    To get the ball to constantly bounce to the same height, set restitution of the ball to one, and set the max velocity to whatever you deem fit. Also check apply max velocity. Should do the trick.
  • VmlwebVmlweb Member Posts: 427
    I don't think setting max velocity would work because I need it to move left and right with the accelerometer.
  • EastboundEastbound Member, BASIC Posts: 1,074
    You could just have the left and right movements adjusted with changing the x value.
  • VmlwebVmlweb Member Posts: 427
    Nope setting max velocity still resulted in it slowing down
  • VmlwebVmlweb Member Posts: 427
    my gravity is 500 but the problem is if I don't have any gravity the ball won't bounce at all
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    What about a rule that says when ball collides with floor change velocity to (some speed) 90 to scene?
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Keep in mind that the GS collision detection is not perfect
Sign In or Register to comment.