gamify Posted April 4, 2017 Share Posted April 4, 2017 I need onhover popup dom element exactly top right of sprite but the dom element is taking position mismatch how to maintain standard position just above the sprite so please can anyone help on this Quote Link to comment Share on other sites More sharing options...
gamify Posted April 5, 2017 Author Share Posted April 5, 2017 please can anyone help on this Quote Link to comment Share on other sites More sharing options...
agmcleod Posted April 5, 2017 Share Posted April 5, 2017 Not too sure of the specific answer, but be sure to keep in mind that the sprite positions will be world based, and you need screen based. Further more, if the canvas doesn't take up the whole screen, you'll need to account for the offset position relative to the html body of the canvas element itself. Quote Link to comment Share on other sites More sharing options...
obiot Posted April 6, 2017 Share Posted April 6, 2017 indeed, the worldToLocal() method is definitely one of your friend here to convert to screen coordinates. Quote Link to comment Share on other sites More sharing options...
gamify Posted April 6, 2017 Author Share Posted April 6, 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.