Jump to content

Collision map & go to pointer


Pietari
 Share

Recommended Posts

I am thinking about starting to learn and use Phaser, but there is a couple of things i would like to know if there is a way to do them in Phaser.

First, Is there a way to make something like collision maps? Like that i draw a png with white and red in it and an object cannot go to the red area? (i think i attached something like that here)

Second, Is there a way to move an object to where i clicked, and make it have an animation while the object is going there?

Like if i click below my object, it plays a "WalkDown" animation, and if i click somewhere on top of my object it will play a "WalkUp" animation. So it would first get the angle from the object to the pointer, and if the angle is "180" then when clicked it would play the "WalkDown" animation.

Does this make any sense? Is it possible with Phaser?

collisionmap.png

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...