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.
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.
Develop games in your browser. Powerful, performant & highly capable.
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)