Closed sro5h closed 4 years ago
Hi! Thanks for trying xygine. This is because the default view of a scene is automatically cropped to 16:9, with a world view of 1920x1080. As your window is not 16:9 the view is cropping the scene. It's hard to see because the scene background is black, disguising the black bars at the top and bottom of your window. If you want the view to fill the entire screen you need to create a new entity with a Camera
component and set the camera's view to match the window. Then use xy::Scene::setActiveCamera()
to set the new entity as the scene camera.
I suspected i was missing something, thanks for clearing it up. So far i really like working with xygine :) By 'world view' you mean the world coordinate system right?
Yes, world view = world coordinates (sorry the right words didn't come to me at the time). I'm glad you like it, I'd love to see what you do with it!
I just started trying out xygine and if i draw a
sf::RectangleShape
at position (0,0) the shape does not appear in the top left corner of the window. Instead it is move down a little and if i move it up (eg. to (0, -10)) it gets cut off.The console window renders as expected though and this also happens if i draw text using the
Text
component to the window.I am on Fedora 31 and am using SFML 2.5 and the master branch of xygine. I also added a screenshot: