Balls occaisionly go through the walls.

sparx13sparx13 Member Posts: 97
edited July 2012 in Working with GS (Mac)
Hi, Can someone help me with this problem.
I have a game and most of the time the balls bounce off all the walls but sometimes 1 ball will go strait through the wall.
Can someone tell me how to fix this problem.

Thanks in advance.

Best Answers

  • mynameisacemynameisace Hull, UKPosts: 2,484
    Accepted Answer
    Don't use Move To... There's your problem. Use a different way to move your character with physics and your problem should be fixed.

    Ace
  • tatiangtatiang Posts: 11,949
    Accepted Answer
    Glad to hear you got it working!

    Please don't reject answers that are on topic (and in this case, correct). The "Rejected Answer" status is really for posts that have nothing to do with the question or aren't trying to be helpful.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Answers

  • GLGAMESGLGAMES SingaporeMember Posts: 988
    Erm i think i have this problem before too. And i think it was mentioned that by rearranging the actors in your scene according to which rule should be run first will help solve the issue. sometimes the rule for collision is activated after the movement rule , sort of a delay.
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    I'm 25, but any thread with balls in the title still makes me grin haha.

    To reiterate what @GLGames said. That could be the underlying problem. GameSalad fires the actor at the bottom of the layers first, then works it's way up. Inside an actor, it does the opposite and fires the top rule first.

    Ace
  • sparx13sparx13 Member Posts: 97
    Hi, I tried increasing density and putting the collide with wall option at the top of the ball actors behaviors but they still occasionally go through walls.

    Any other ideas?
  • sparx13sparx13 Member Posts: 97
    edited July 2012
    Hi I recently posted a message about the balls in my game occasionally going through the walls. Its really annoying because i have a certain amount of balls to spawn and you have to destroy a certain amount to beat the level. If one of the balls go through the wall you can not pass the level so its really annoying.
    I have put the collide with wall rule before the move rule and I also got a suggestion about increasing the density. Although I'm unsure if I did this right, was i supposed to increase the density on the ball or the wall or both?
    If anyone has any ideas of how to fix this it would be great.
  • ericzingelerericzingeler Member Posts: 334
    Do the balls need to bounce off the wall?
  • sparx13sparx13 Member Posts: 97
    Do the balls need to bounce off the wall?
    Yes deffinattely I don't think the game could work any other way.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Please don't create multiple threads for the same issue. I went ahead and merged the two threads. It's a good idea to post your rules so that the community can help you further.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • sparx13sparx13 Member Posts: 97
    I have a move to rule, a collide and bounce with wall rule and more such as the ball being destroyed.

    I really NEED help with this it's a vey big issue.
  • sparx13sparx13 Member Posts: 97
    Don't use Move To... There's your problem. Use a different way to move your character with physics and your problem should be fixed.

    Ace
    Thanks, but how do I do that?

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited July 2012
    Use Change Velocity or Change Attribute self.Motion.Linear Velocity.X/Y. Accelerate Toward might work, too.

    Oops, mynameisace is right... forget about Interpolate. Was just trying to brainstorm movement behaviors. :)

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    Yeah, but avoid Interpolate too, as collisions don't work with interpolate.

    Giving you advice as to which way to use really depends on your game. Do you have a video or a description or something of what you are trying to do? There are a million ways to move a character, but each one has it's strengths and weaknesses.

    Ace
  • sparx13sparx13 Member Posts: 97
    The balls just bounce off the wall and the aim is for the character that i control is to run into the balls and destroy the halls.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited July 2012
    Have you tried using a Change Velocity behavior? If you have and it's not working, you'll need to provide a screenshot of your ball's rules (sorry, couldn't resist... @mynameisace) or send me a link to your zipped project file so I can take a look at it.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • sparx13sparx13 Member Posts: 97
    No I haven't tried change velocity. Are you able to give me simple instructions on how to do it? If you can that would be great!
  • sparx13sparx13 Member Posts: 97
    Thanks, I have now got balls that always bounce off the wall.

    THANKS!!!
Sign In or Register to comment.