Hi everyone!
I am trying to add a right-click menu, but I got a weird problem:
- I click on scene, and scene.pointerX/Y can get coordinates of cursor in pixel unit;
- Although it’s not integer due to Why are scene.pointerX and scene.pointerY not integers? - #7 by wulf11, but I think it doesn’t matter;
- I create a container with the XY (container.left=X…) but container wont show near my cursor
- the more cursor off the scene center, the more container shift away cursor.
- The XY i got is correct, i have calibrated on the corner of scene, and compared with canvas size.
- the funny thing is I cannot reproduce it in playground…
Here is a screenshot: I hardcode container at (1000px, 500px), and red point is where scene.pointerX, Y equal to this value.
Can you please give me some advice how to debug this?
Sorry for this confusing question…
Bests,