Open dblhack opened 3 months ago
I believe the issue is cause from using the Camera.LookAt() method.
protected override void Update(GameTime gameTime) { _tiledMapRenderer.Update(gameTime);
MoveCamera(gameTime);
_camera.LookAt(_cameraPosition); // <<<----------This is the issue, always puts origin in center
base.Update(gameTime);
}
The sample tutorial for version 4.0 loads tile map so that the map is offset from position (0,0) of the screen. Using the same code base as the sample, I load my tile map and the upper left of my map is in the center of the screen. See attached screen shot.
I also uploaded a screen shot from the actual tutorial. I fully expect the map start at position (0,0).
It could be I totally don't understand the code, but since my map has objects embedded in it and I need to create those objects at the location they were placed in the map, I don't see how to create them with the offset.