Collision problems on iPhone

SpaghettiStudiosSpaghettiStudios Member Posts: 18
edited November -1 in Working with GS (Mac)
I have created a game in which an actor collides with walls dotted around the playing area.

When I test the game in GameSalad Preview, the actor collides perfectly. When I test on the iPhone, however, it goes through the wall and only collides when it hits the backend of the wall.

That's not a good explanation. So here's a text visual (the first is how it should be, the second is what is happening with the / /s being the wall).

ACTOR/ / ACT/OR/

Why won't the actor collide and bounce away when it hits the outer wall and instead goes into the wall to the back end before bouncing? This problem has only just started happening - all the way through development is has worked fine and yet I haven't changed any settings.

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    What I am about to suggest is a horrible idea and should only be used if nothing else works! But anywho...

    Make the moving object invisible. Constrain two game integer attributes to the now invisible actor. Create a second actor with the image that you have been using in the now invisible actor. In this new actor constrain it's x and y to the two game attributes. Now here is why I am suggesting this. You should be able to make adjustments to the inviisble actors size (make it bigger) so that when it goes into the wall before bouncing the smaller constrained visible actor will start bouncing off before it's image overlaps with the wall. so it will look and feel like a normal bounce. Here's why you should only do this as a last resort. Constraining will probably lose 4-5 fps. So hopefully someone smarter than I will give you a better idea! But if you already have a high fps this may work just fine.
Sign In or Register to comment.