Closed LiamMcKenzie closed 4 months ago
Here is the basic scene setup, I've added simple camera movement. I still need to add the player movement
Hey I've had a look at this and it's great. The animation has nice character and the player is maintaining the correct position relative the tiles. In regards to the issue with the player "disappearing", this is because when then gridchunks are repositioned the list of tile controllers is repopulated so the tiles maintain the correct coordinates. However the player is not updating its coordinates when this happens. So the player doesn't disappear so much as move to a tile offscreen, which also deactivates the player if the tile optimisation is turned on. A quick, somewhat inelegant solution to this is to fire an event when the RepositionGridChunk method is called is in TileManager. Then listen for this event in PlayerMovement and subtract 14 from the player's x coordinate when it's invoked. I haven't tested this rigorously but it seems to resolve the issue.
Linked Issues:
3
4