gamify Posted April 20, 2017 Share Posted April 20, 2017 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 Quote Link to comment Share on other sites More sharing options...
Parasyte Posted April 20, 2017 Share Posted April 20, 2017 Drawing order and event processing order are both defined by Container children's z-index. Make sure the z-index is specified appropriately when each child is added to the Container. Quote Link to comment Share on other sites More sharing options...
gamify Posted April 20, 2017 Author Share Posted April 20, 2017 okay i will try thank you Quote Link to comment Share on other sites More sharing options...
gamify Posted April 20, 2017 Author Share Posted April 20, 2017 even after adding addChild(child, z) the images are not draggaged above map is there any other solution Quote Link to comment Share on other sites More sharing options...
agmcleod Posted April 21, 2017 Share Posted April 21, 2017 Be sure you the z-index isn't getting overwritten. `me` is in global scope, so you can access the game world in realtime via developer tools. Traverse the scene graph, and see what the z-indexes are. Figure out why the images arent appearing above. Quote Link to comment Share on other sites More sharing options...
gamify Posted April 25, 2017 Author Share Posted April 25, 2017 okay i will try thank you Quote Link to comment Share on other sites More sharing options...
obiot Posted May 8, 2017 Share Posted May 8, 2017 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 Quote Link to comment Share on other sites More sharing options...
gamify Posted May 9, 2017 Author Share Posted May 9, 2017 okay thank you i will try Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.