Rybar Posted March 24, 2014 Share Posted March 24, 2014 Phaser 2.0.1 with arcade physics, sometimes player gets stuck on the ground. No "jump" logic in, should be able to hit up and fly, but sometimes gets stuck. Any ideas why? http://labs.ryanmalm.com/learnphaser3/ Link to comment Share on other sites More sharing options...
MichaelD Posted March 24, 2014 Share Posted March 24, 2014 It did not occur to me, unless I was pressing left/right+up buttons then it was stuck on the ground until the ground-ended then it moved up. Also when pressing up it does a small bounce then launches up that also looks un-realistic so maybe if the keybindings got a bit of a rework it would generate the feeling of flying better. I hope it helps. Link to comment Share on other sites More sharing options...
Rybar Posted March 24, 2014 Author Share Posted March 24, 2014 There's nothing wrong with the keybindings; it's very simple left, right, and up, modifying only the velocity of the player. Something is going on with the collision response, where I can't escape the ground unless I double-tap the up key or "wiggle" a bit first. Link to comment Share on other sites More sharing options...
nunorfpt Posted March 24, 2014 Share Posted March 24, 2014 Have you tried the physics overlap to check the bounds of the collision objects?Something like game.physics.overlap(player, layer, collisionHandler, null, this); might give you more info about each object position Link to comment Share on other sites More sharing options...
Rybar Posted March 25, 2014 Author Share Posted March 25, 2014 The problem ended up being the order I was doing things in update. I was checking for input first, and then doing overlap and collide checks. Flipped the order around, solving collisions first and THEN checking for input, problem solved. Link to comment Share on other sites More sharing options...
Recommended Posts