That's the whole problem: how to flip the screen from horizontal to vertical using Love2D?
|
1 answer
For rotation, use the function love.graphics.rotate
- This function is used to rotate objects. Of course, with its help, you can organize a crutch to solve the problem, but I ask specifically about turning the screen and changing the window orientation (if this concept is applicable in Android) - Vidoom
- This function rotates absolutely everything that was drawn after its call, inside love.draw (). If you call it at the very beginning, it will rotate the entire screen. This is not a crutch, so conceived. Similar functions, such as love.graphics.scale, work identically. - Beast Winterwolf
- It turns out a crutch, is not it? Indeed, in this case, the drawing still goes to the horizontal screen. Only image inside is rotated - Vidoom
- In Love2d, there is no way to flip the image on the screen by internal means of android, but in terms of performance, there is no difference. There is no such function, because it is not needed. love.graphics.rotate only sets the angle for drawing frames, it does not cause any special load (if you think that it turns objects separately, then this is not so, not the objects, but the coordinate system rotate). - Beast Winterwolf
- To be precise, there are no "objects", there are only frames that are drawn 60 times per second and the engine doesn't care at what angle to draw them. When you rotate something separate on the screen, you only temporarily change the overall angle. - Beast Winterwolf
|