Jump to content

Forcing the player to move a direction when he overlaps a sprite


Recommended Posts

Basically I want to make an arrow sprite that automatically moves the player in that direction when they walk over it.

1) Can I even do this with arcade physics? When I set arrowsprite.body.enable=true, that makes the sprite solid and the player can no longer walk over it. I've thoroughly studied the docs and forums and there is no way to give a sprite collision *or overlap* logic without making it solid and impassable.

2) There is also no way to force player sprites to move regardless of the player's input. That behavior seems reserved only for non-player sprites. Do I have to create a separate non-player sprite, usually control that with player inputs, and make the actual player sprite invisible?

If arcade physics doesn't have these functionalities in phaser 2, what should I use (for phaser 2)?

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.

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.


  • Recently Browsing   0 members

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