Jump to content

Check collision of tile while on top


Göran
 Share

Recommended Posts

Hello everybody.

 

In the process of experimenting with Phaser I startet to write code, which will implement "ladder functionality". Ladders out of platformers.

I got it working to the point, where If the play is on the ladder tile and presses up, the velocity changes. BUT, the player sprite is being rendered behind the actual ladder. How can I change this?

 

Here is a screenshot of it in game: Screenshot_11262014_10_54_21_PM.png

 

I would like the sprite to be on top of the ladder.

 

 

 

I am using the latest stable version of Phaser.

I really appericiate any help anyone can give me.

 

Link to comment
Share on other sites

Sorry for the late reply.

 

Glad it solved your problem :). About your grass issue, I did some googling and found out the sprite object has a method to bring it to the top of the display list. Not sure if this will solve your issue as I haven't used this myself. Here is the documentation for the method http://docs.phaser.io/Phaser.Sprite.html#bringToTop

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