help with camera following player sprite on maps
-
loaded up a map and player no problem but cant get the camera to scroll to follow player, i need to camera to follow in all directions
-
Hey,
so far, I can't really assist you. What did you already try?
Glancing over the problem, maybe
https://fuzearena.com/help/view/centreSpriteCamera
can help? -
@mario-bodemann il try it tomorrow,, iv tried all sorts but dont think iv used that yet as im still learning.
bit confused on what to put in for the x . y poscentreSpriteCamera ( xpos, ypos )
-
@waldron If it helps, the x and y will define the top left pixel of the camera. So if you want to center on an x and y:
spritecamera(x - gwidth()/2, y - gheight()/2)
-
If you want the camera to follow your Sprite then do this : centerspritecamera(player.x,player.y) that should do the trick.
-
Thankyou for your help this helps me massively on a number of projects
-
Working thankyou ! I know its something so simple but I'm only just starting to use maps instead of the level arrays and got confused