Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
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 currently doing this... it works fine on layouts that don't scroll. But my gameplay layout scrolls with the player and the mouse is constantly moving even though the player is not touching it. So it is not auto-hiding.
Huh, I was doing exactly the same in my game just a few hours ago!
You need to check Mouse.X("HUD") and Mouse.Y("HUD") , where HUD is a layer with zero parallax.
dop2000 wow, I didn't know you can reference specific layers with the X/Y methods? but now the debug numbers make sense! I was seeing crazy number differences between MousePrevX and Mouse.X
Develop games in your browser. Powerful, performant & highly capable.
You can also use Mouse.AbsoluteX and Mouse.AbsoluteY to get coordinates relative to the game window (or canvas) and not the layout.
Magistross oh excellent!
also note the mouse pointer has to be on a parallax 0,0 layer as well.
I have my "HUD" and a layer above that called "mouse layer" since I always want my mouse on top of everything, but I had to have it be full scroll mode when I was using plain old mouse.x/y