How do I make it so there is a max or min speed

0 favourites
  • 7 posts
From the Asset Store
Support AdType ( AppOpenAd, Banner Ad, Interstitial Ad Rewarded Ad, MREC Ad) support c3 build service
  • Hi, sorry this is probably a dumb question but I am making a pong like game with multiple paddles on each side where the ball gets faster or slower depending on which paddle the ball hits. Well my question is how do I make it so there is a minimum or maximum speed the ball can go, because right now the ball will either end up going so fast that it glitches out of the room or it could stop moving completely. I cant post screenshots because I just made this account but you can find them at{{{/5ZtQL.{{{png{{{/5Zu6W.{{{png

    remove the {{{'s

    Hope this isn't against the rules.

    Also, if its not too much trouble would someone mind telling me how I would make it so the ball goes through the paddle if it is going through the back of the paddle if that make sense. I hope i'm not asking too much Thank you for any help though.

  • try out physics

  • Sorry, what does that mean? I kinda know what the physics behavior does but if you could elaborate more that would be very helpful.

  • set bullet speed to ball.bullet.speed - (100*ball.bullet.speed >400)

    where, in this case, 400 is the slowest speed you want.

  • concerning going through the back of the paddle (ie one way ) you could look at checking the angle the ball is travelling at and only bouncing it if it is the correct direction ? does that make sense ?

  • Yeah thanks dude you've helped me a lot, knowing that there are people like you that are willing to help just to help is mind blowing to me. I cant wait to finish this game so I can show you because I haven't fully explained what the game is. I think its an insane idea and my friends think the same but at the same time idk because it is my first game lol like what do I know.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You could also give the ball two variables Min and Max.

    When the ball hits paddle A, set speed to Min

    When the ball hits paddle B, set speed to Max

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)