I’m having a problem checking the mouse it doesn’t follow the mouse it stays away even though it’s in the same position as mouseX and mouseY .I’m trying to create a slider for the right left character like the game and platformer.
estou com um problema no check do mouse o mesmo não segue o mouse ele fica distante mesmo estando na mesma posição do mouseX e mouseY .estou tentando criar um controle deslizante para o personagem direita esquerda como o jogo e de plataforma.
When using layers, the layer where the mouse click / screen touch detection is done is important because the X and Y values depend on the layer / camera position.
Try to move your Mouse_Check to a different layer.
If you aren’t using layers, then check the origin point of your Mouse_Check object. It may be put outside the object, leading to the bad following.
does not work already tried, do you know if there is another way to make this slider the way it shows the image? I saw a picture on google but find it on the forum.
You placed mouse_check on the layer Gui, but take the mouse position from the base layer - the default layer for MouseX().
You can’t do that, especially if you have parallax scrolling.
If you place mouse_check on the Gui layer, then you must use MouseX(“Gui”, 0) and MouseY(“Gui”, 0) to get the correct mouse position.
Think of it this way. If your Gui layer doesn’t scroll, but the base layer has scrolled by 100 pixels both left and up, then what used to be 100,100 is now 200,200 on the base layer, but still 100,100 on the Gui layer; so you end up drawing the object at 200,200 on the Gui layer, when it should still be at 100,100, because the Gui layer hasn’t scrolled…
I will record a video because it’s easier.
but even removing the included events from it. and another thing I don’t know if it has to do with this when trying to generate the project for android’s error.