Jump to content

viewport


gamify
 Share

Recommended Posts

hello actually i am using container renderer for background and above background placed images and images are dragging on mouse click  but dragging is happening behind the game map

i tried floating not working

 

can anyone help please for drag movement

 

Link to comment
Share on other sites

  • 2 weeks later...

worth noting that by default a container will use the auto-depth feature :

http://melonjs.github.io/melonJS/docs/me.Container.html#autoDepth

so unless an additional z argument is specified, it will ignore the z property of the child position vector :

https://github.com/melonjs/melonJS/blob/master/src/renderable/container.js#L145-L150

 

but then once an child  added, you can just modify the object pos.z value as you wish, it will automatically be taken in account

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