Hi !
I need to position a game object in the centre of the screen ! How I can do this?
You can read the screen width and height as set in game.project using sys.get_config(“display.width”) and sys.get_config(“display.height”). Now, on some systems these values can change as the window is resized, and in that case you need a custom render script and from that script read render.get_window_width() and render.get_window_height() and set these in a Lua table that you can read from your other scripts.
2 Likes