Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
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?
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 ?
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.
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