Sign in to follow this  
Followers 0
gamify

zindex

8 posts in this topic

i am setting  this.autoDepth=false; but still z index taking automatically only ...

Share this post


Link to post
Share on other sites

hi guys,

can i change the z-index of draggable entity while dragging it ..

i am placing few draggable entites and all of them having z-index 10,now when i drag the entity it should come on top of all other draggable entites so i am trying to change the z-index=11 on dragstart but its not affecting what should i do.

Share this post


Link to post
Share on other sites

hey guys good news i found it just make change the pos of z while dragmove then it will not select other object(mutiple objects or entities).

thank you having funB) with melonjs.

 

 

Share this post


Link to post
Share on other sites

Yeah, you can just change the `z` property on the entity at runtime. You might have to sort the container after changing the depth, but that's really easy. Just call the container's sort method. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.