I need help with collisions

Devolper00Devolper00 Member Posts: 7
edited June 2013 in Working with GS (Mac)
I am trying to do a simple ball drops into cup motion. I made walls around the cup but the ball keeps going through them. What settings do I need to make it so the ball wont go through and the ball bounces just a little.

Comments

  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    edited June 2013
    You need to have collide behaviors inside of the ball actor that tell it to collide with the wall actors.

    Open up the ball actor on the left side, in the actor bin. Drop in a collide behavior from the list of behaviors underneath the actor bin, and have it collide with the wall actor.

    Take a look at these links. They will help teach you all the basics of making a game with GameSalad. All sorts of resources to get you going, and these forums are great for information on recent developments, and help with any problems you come across.

    Welcome to the forums!
    \m/

    http://www.youtube.com/user/GameSaladCookbook/videos

    http://gshelper.com/

    http://www.deepblueapps.com/

    http://www.youtube.com/user/dsouza41
  • UtopianGamesUtopianGames Member Posts: 5,692
    We have a free template that might help you.



    http://www.deepblueapps.com/drag-throw-physics/

    Darren.
  • SocksSocks London, UK.Member Posts: 12,822
    Place a 'collide' behaviour into your ball actor.

    In the 'collide' behaviour select your wall actor as the thing you want the ball to collide with.

    In both the ball actor and the wall actor adjust the 'bounciness' settings (under attributes > physics) to your taste.

    In the wall actor switch off 'movable' (under attributes > physics) so the walls don't get pushed around when the ball hits them.
  • Devolper00Devolper00 Member Posts: 7
    Well the point of my game is the ball is moving at the top of the screen and u click it to drop the ball into the trashcan(or u fail onto the floor) and it gets falling though walls that i have put around the trash can
  • Devolper00Devolper00 Member Posts: 7
    @Socks I tried to make it more dense and to turn off movable and nothing is helping
  • WingmanappsWingmanapps Member Posts: 458
    Yes but if dont have collide rules!!!!!
  • SocksSocks London, UK.Member Posts: 12,822
    @Socks I tried to make it more dense and to turn off movable and nothing is helping
    What are you using to make the ball move ?
  • SocksSocks London, UK.Member Posts: 12,822
    We have a free template that might help you.



    http://www.deepblueapps.com/drag-throw-physics/

    Darren.
    @DeepBlueApps

    Excellent template !

    :)>-
  • Devolper00Devolper00 Member Posts: 7
    when its pressed it acelrates
  • WingmanappsWingmanapps Member Posts: 458

  • Devolper00Devolper00 Member Posts: 7
    ik how to make actors colide but my problem is 1 actor goes thtough the other. Tell me how to make an actor soild!!!
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    The Collide behavior is what makes objects appear to be solid, because then the bounce off of each other. If you have collide set up and it's not working properly maybe there is another issue. For example maybe your object is moving too quickly for the engine to detect the collide and the two objects are passing through each other before the engine even takes note...
  • Devolper00Devolper00 Member Posts: 7
    How fast is too quickly my object is moving at the speed of 2000
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    It would depend on different factors, like your object speed and the physical thickness of the item it is colliding with, etc. Just try cutting the speed to 1000 and see if it still 'misses' then try 500, etc. Test things out and see what happens.
Sign In or Register to comment.