Moving barrier

andrewm2211andrewm2211 Member Posts: 341
edited November -1 in Working with GS (Mac)
Hi

Im making a cannon game, where you have to shoot the ball into the goal.

I have a moving barrier in front moving up and down, when the ball hits the barrier, it moves the barrier regardless of how high I set the density.

What can I do to keep the barrier moving, but not be affected by the hits from the cannon.

Thanks.

Comments

  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Best way, under physics, set the actor to be not moveable. Then use interpolate to move the barrier up and down. Your ball will then collide but wont move the barrier.
  • andrewm2211andrewm2211 Member Posts: 341
    Thanks I'll try that, is there a way to ignore, rules and such you put on actors.

    By that I mean, make the rules inactive without deleting them?
  • andrewm2211andrewm2211 Member Posts: 341
    Hm, I'm trying to figure this out myself the best I can.

    How do I get it to loop up and down? I can interpolate self.positionY = 0 ... then what?

    Thanks so much in advance
  • andrewm2211andrewm2211 Member Posts: 341
    *shameless bump
  • andrewm2211andrewm2211 Member Posts: 341
    Hi, T-shirt booth

    That does get the movement I want, but in order to do that I have to check 'movable' So now when my cannon balls hit the barrier, it bounces.

    I would like to not be affected by the cannon balls at all.

    I appreciate the help so far though, it's a good learning experience regardless, so thank you.
  • andrewm2211andrewm2211 Member Posts: 341
    nevermind, I was being dumb, and didn't constrain my X correctly.

    Your solution worked, thank you.
  • mkfostermkfoster Member Posts: 27
    @tshirtbooth, this post was helpful. it works great. one question, when I launch a ball and it hits the moveable barrier, it bounces off slightly and slows the ball down to a crawl. I'd like the ball to maintain it's original velocity. Any Ideas? thanks. :)
Sign In or Register to comment.