I am trying to spawn a player on an object created in Tiled. However it is offset and is drawing it in the screen space instead of world space.
When I then convert the world position to the screen position, it does not seem to affect the value.
I am trying to get the character to spawn here
However my character spawns over here instead
I initialise the camrea like so
var viewportAdapter = new BoxingViewportAdapter(Game.Window, GraphicsDevice, 800, 480);
_camera = new OrthographicCamera(viewportAdapter);
and spawn the character like so
_entityFactory = new EntityFactory(_world, Content);
var spawnPoint = _camera.WorldToScreen(spawn.Objects[0].Position);
I would assume that camera.WorldToScreen
would convert the coordinates but it returns the exact same coordinates back.
Obviously I’m doing something wrong here but I am not sure.
Any help is appreciated and let me know if any more information is needed.
Thanks!