Help with collisions?

Games4lifeGames4life Member, PRO Posts: 279

How do I make it so that my bubble actor collides with the red actor, but does not go under the actor:

I want the bubble actor to collide with the red, but is restricted of actually going under the actor like so:

NOT LIKE THIS

Thanks,
~G4L

Comments

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276

    You should be fine just using the "collide" behavior.
    How have you set it up right now? Can you post a screenshot of the rules?

    Mental Donkey Games
    Website - Facebook - Twitter

  • Games4lifeGames4life Member, PRO Posts: 279

    @NipaGames said:
    You should be fine just using the "collide" behavior.
    How have you set it up right now? Can you post a screenshot of the rules?

    Rules and physics of the bubble:
    --> Now the bubble pushes the wall away into 'space'.


    Thanks

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276

    Try turning "movable" off in the WALL actor.

    Mental Donkey Games
    Website - Facebook - Twitter

  • Games4lifeGames4life Member, PRO Posts: 279

    @NipaGames said:
    Try turning "movable" off in the WALL actor.

    Unfortunately that did not work. Maybe it has something to do with the actor's moving rules?

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276
    edited December 2015

    Yep, that might be it. Constraining to mouse positions does not work well with collisions.
    Lucky for you, there is a workaround. Try this:
    gshelper.com/shop/free-templates-and-tutorials/constrain-to-mouse-and-keep-collision-gamesalad/

    Mental Donkey Games
    Website - Facebook - Twitter

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    When you constain or use interpolate you override the physics engine which handles collisions. I recommend you watch my video series on the physics engine so you understand how it all works.

  • Games4lifeGames4life Member, PRO Posts: 279

    @NipaGames said:
    Yep, that might be it. Constraining to mouse positions does not work well with collisions.
    Lucky for you, there is a workaround. Try this:
    gshelper.com/shop/free-templates-and-tutorials/constrain-to-mouse-and-keep-collision-gamesalad/

    @Lost_Oasis_Games said:
    When you constain or use interpolate you override the physics engine which handles collisions. I recommend you watch my video series on the physics engine so you understand how it all works.

    Thanks for your suggestions I will try them both.
    Thanks,
    ~G4L

  • Games4lifeGames4life Member, PRO Posts: 279

    @NipaGames said:
    Yep, that might be it. Constraining to mouse positions does not work well with collisions.
    Lucky for you, there is a workaround. Try this:
    gshelper.com/shop/free-templates-and-tutorials/constrain-to-mouse-and-keep-collision-gamesalad/

    I tried that and i'm not sure my coding is right. The user can touch anywhere on the screen and move the main actor. The touch is not limited to just the character.

    Here is my coding:

  • Games4lifeGames4life Member, PRO Posts: 279

    @Lost_Oasis_Games said:
    When you constain or use interpolate you override the physics engine which handles collisions. I recommend you watch my video series on the physics engine so you understand how it all works.

    I appreciate your suggestion. I looked over your videos and it seems like it does not fit my problem. All i want is for the actor to collide with the wall. However, since I have many constrains that seems like that is causing the problem. Do you know how I can fix this?

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited December 2015

    If you set the above code you posted to touch is pressed it will work. Those videos are to show how the engine works and what you can and can't do. There are only a few options for constraining an actor to the mouse and keep collide intact.

    Remember that using mouse button is down doesn't restrict it to the actor just that the mouse button is down. Remember that on a touch device your finger is the same as the mouse so when you touch the screen anywhere that is the same as pushing down the mouse button. To restrict the touch to the actor you need to use touch is pressed or released. Touch is pressed is related to a touch of the actor mouse is related to the screen not the actor.

  • Games4lifeGames4life Member, PRO Posts: 279

    @Lost_Oasis_Games said:
    If you set the above code you posted to touch is pressed it will work. Those videos are to show how the engine works and what you can and can't do. There are only a few options for constraining an actor to the mouse and keep collide intact.

    Remember that using mouse button is down doesn't restrict it to the actor just that the mouse button is down. Remember that on a touch device your finger is the same as the mouse so when you touch the screen anywhere that is the same as pushing down the mouse button. To restrict the touch to the actor you need to use touch is pressed or released. Touch is pressed is related to a touch of the actor mouse is related to the screen not the actor.

    I tried that and that did not seem to work as well... The code for the bubble is in the 5th post. It should work with that right? Or is it different?

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    What is the density of the red actor it collides with? Try increasing that density and put some density on your bubble.

  • Games4lifeGames4life Member, PRO Posts: 279

    @Lost_Oasis_Games said:
    What is the density of the red actor it collides with? Try increasing that density and put some density on your bubble.

    I'll try that and get back to you. Thanks for your help.

  • Games4lifeGames4life Member, PRO Posts: 279

    @Lost_Oasis_Games said:
    What is the density of the red actor it collides with? Try increasing that density and put some density on your bubble.

    That unfortunately did not work.

    BTW the other forum was just another around this problem. I found another solution that could be worked around. That was a different problem concerning collisions once again. Sorry for the confusion.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    There seems to be some issues with collisions. GS staff is looking into it. I would just work on so e other stuff until they sort out the issue.

  • Games4lifeGames4life Member, PRO Posts: 279

    @Lost_Oasis_Games said:
    There seems to be some issues with collisions. GS staff is looking into it. I would just work on so e other stuff until they sort out the issue.

    Ok, thanks very much. I appreciate your help.

Sign In or Register to comment.