vespercore02 Posted December 8, 2014 Report Share Posted December 8, 2014 how to enable overlap when click or pressing some key? like down key when the player is on the ledge instead of moving to the edge to go down will press/click down key to done moving down? Quote Link to comment Share on other sites More sharing options...
Elindur Posted December 11, 2014 Report Share Posted December 11, 2014 I'm not sure I've understood your question, but if you want to check if sprites are overlapping instead of colliding depending if a key is pressed, you just need to save the fact that the key was pressed (with a callback), and, inside your code managing collision detection, replace :myGameInstance.physics.arcade.collide(...)with :myGameInstance.physics.arcade.overlap(...)But if you just want the player to be able to move and overlap freely with some prites, just don't call the collide()/overlap() Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.