thefootballguy Posted August 30, 2016 Share Posted August 30, 2016 CODE PEN: http://codepen.io/thefootballdaddy/pen/GjKvYE I have been trying to fix this problem for days any help will greatly be appreciated. The problems I am having is: A: The collisions between objects are in the Moveable group are falling on top of one another. By pressing The '1' key a few times you can see that collectable group collides and stack but they will sink to one another after 2-3 stacks. Looked around HTML5 and old post on the fourm but the solution wasn't found. B. The collisions between immovable objects are not colliding with each other and are occupying the same place. Using immovable objects by pressing 3 a few times creates the immovable white blocks but they won't stack. Again thanks for reading my post. Link to comment Share on other sites More sharing options...
lumoludo Posted August 31, 2016 Share Posted August 31, 2016 Here's another forum post that describes your same problem as well: Have you tried using the P2 physics instead of the Arcade physics? I also noticed that the problem wasn't "as bad" if I moved the character a bit while spawning the collectables. If they were offset slightly on the x-axis instead of directly on top of each other, they stacked better. This is just an observation, but it leads me to believe it could be some sort of math error in the physics implementation. Another thing mentioned in that link I included was the possibility of calling the game.physics.collide() call(s) more than once per frame. It did seem to help the problem a little, but as mentioned there, this would certainly be a BAD THING to do. So don't do that for a serious fix, but you can check it out. Link to comment Share on other sites More sharing options...
samme Posted August 31, 2016 Share Posted August 31, 2016 9 hours ago, thefootballguy said: Using immovable objects by pressing 3 a few times creates the immovable white blocks but they won't stack. I think those blocks are all being created in the same place. Link to comment Share on other sites More sharing options...
samme Posted August 31, 2016 Share Posted August 31, 2016 @thefootballguy Try this: http://phaser.io/sandbox/TJKQHaxN/play thefootballguy 1 Link to comment Share on other sites More sharing options...
Recommended Posts