Download

How to Snap Camera to Tile Map Automatically?

I’ve finally managed to get the camera to point at my Tile Map for my Paper2d level, but it took me far too long and it’s not precise.

I will be having several 2d levels, some scrolling (based on character movement in all four directions, like an RPG) and some fixed (small rooms).

I’ve been able to get the camera to follow (move with) my 3d character, and I assume it won’t be too hard to make it follow my 2d character. But for the small levels I want it to center on the tilemap and not move. (Actually, this might work within the logic of not letting the camera get too close to the edge of the screen, so maybe if I understand how to make the camera follow the character most of the time but not at the edges of the screen, I’ll have solved how to have it stay centered on the smaller tile maps.)

But yeah, I want it to look straight at the tile map and center on it, and I’d like to have it zoom in to a set resolution so the tiles are the same size no matter which room I enter. I don’t have a clue how to do either one. Please bear in mind I’m still in the Blueprint stage, not yet to code, so if there’s a Blueprint solution then help me understand it.