Hi,
I'm setting one of my objects to go to Mouse.X, Mouse.Y every tick, but it doesn't go accurately to the mouse pointer position.
What am I doing wrong?
Is it something to do with scaling of the layout?
Cheers,
Martin
Where does it go instead?
Develop games in your browser. Powerful, performant & highly capable.
It's accurate when in the centre of the screen. When at the edges of the screen the sprite overshoots the mouse pointer and appears at a more peripheral position (or off the screen).
Strange... I just tried it and it works perfectly in my project. Maybe you can provide a capx?
Are you doing anything with layer parallax or scale or scroll to ?
Please post a basic capx that show this ?
Thanks Guys,
here's the Capx - sorry it's so big - it's because of the huge background image - it's the main feature of the project and I don't really want to lose the great detail. (Any tips for retaining this detail and improving performance gratefully received!).
https://dl.dropboxusercontent.com/u/437 ... 0Capx.capx
You'll see that the mouse pointer misalignment worsens as you zoom with z and x. I've tried various ways of adjusting mouse.x and mouse.y by factors related to the scale, but to no avail.
Nerdsville
with scaling/fullscreen modes mouse.x doesn't always match correctly
but if you do mouse.x("layername") it will return the mouses position on that specific layer
you can also do mouse.x(0) where 0 is the layer ID