Help with collisions?
Games4life
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
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
Rules and physics of the bubble:
--> Now the bubble pushes the wall away into 'space'.
Thanks
Try turning "movable" off in the WALL actor.
Mental Donkey Games
Website - Facebook - Twitter
Unfortunately that did not work. Maybe it has something to do with the actor's moving rules?
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
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.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Thanks for your suggestions I will try them both.
Thanks,
~G4L
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:
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?
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.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
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?
What is the density of the red actor it collides with? Try increasing that density and put some density on your bubble.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
I'll try that and get back to you. Thanks for your help.
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.
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.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Ok, thanks very much. I appreciate your help.