Drawing text and camera follow.

Ken Sowyer

  • Posts: 23
Hello!! I've been away for months because off stuff, and now I'm back to finally try to finish my game.

So I searched a lot and just need to confirm. A draw text always get anchored to the screen?
Like, if I draw a text and move the camera, there's no simple way to that text DON'T follow the camera and stay at the x and y given positions of the scene?

If it's true, what is the simple way to make it slide with the other actors while the camera moves?
Or it will be better try another alternative?



  • *
  • Posts: 2738
Coordinates in the drawing loop are screen coordinates--not scene. So they will be anchored. However, you can subtract the x and y coordinates of the camera to anchor them to the scene instead--and get them to scroll.

Ken Sowyer

  • Posts: 23
I tried that, but needed a few adjustments to work right. And there's another text in a diferent position, so... I ended up creating a invisible actor with the Camera Follow behavior, and put one to cross the scene and others I set the x (on screen) to de draws, with the behavior deactivated.
Works great! Thanks for the help!  But I really feel that it suposed to be more simple  ???