Jump to content

[Q] how to enable overlap?


vespercore02
 Share

Recommended Posts

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() B)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...