Reputation: 281
My scene is set to be .AspectFit
. I have camera node in scene center and it is connected. Everything works fine for iPad landscape, but when I rotate simulator or run in different device then iPad in landscape camera is not centred. Why?
This is for landscape with camera on center:
After rotation camera is not centred:
Similar issue is for e.g. for landscape iPhone5s:
Why is camera shifted with scene setting .AspectFit
with other device then iPad in landscape?
You can try out or experiment with this project on bitbucket I made.
EDIT: When I don't use camera, everything is on its place.
Upvotes: 0
Views: 82
Reputation: 16847
Set the scene anchor point to 0.5, 0.5 to center your camera onto the scene , there is an issue with the view to scene conversion, and will draw in the top left corner instead of the center. (Also, you will notice your hello world is off, this is because it is not accounting for the anchor change)
Perhaps the lack of a camera will make the scene translate where it draws to inside of the black bars, I have no idea.
Upvotes: 1