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
Hello everyone,
I would like to match a Sprite with the movement of the mouse, it works but when I'm not in Fullscreen, there is a shift with the true match of the X and Y mouse?
Would you have a technique for that? thank you ;)
Mokoto
I used to use Absolute X and Y occasionally, but I found that using Mouse.X("HUD") or Touch.X("HUD") where HUD is a layer with Parallax set to 0,0 works much better - and should solve the issue you are having.
Develop games in your browser. Powerful, performant & highly capable.
Thank you for your answer, I tried with a simple MouseX but in the game, I can change the map scale and I have trouble falling back on the X of the mouse when I zoom out.
so I think I must use the AbsoluteX but I do not know how to use it.
Oh Sorry, it's working !!!
I forgot the Layer name !! thank you very much
I put a "lerp" so that it does not shake on the screen
lerp(HUDPADhand.X,Souris.X("HUD PAD HAND"),12*dt)
lerp(HUDPADhand.Y,Souris.Y("HUD PAD HAND"),12*dt)