Paper2D-How to setup camera like on super mario?
I'm making a 2D side scroller game and i'm already testing the logic of the game, for full testing i need to setup the cameras as they would be in the final game and the most similar camera system i can find is that of super mario.
one of the things i want is to fix the camera position until the character approaches one of it's boundaries (top, left, right, etc) then the camera would move to the direction of the character a little bit and then it'd have a fixed position again.
another thing is that i want the camera to be looking a little bit above the character instead of having it as the center of the screen, i mean something like this.
i managed to do this, setting the offset of the SpringArm in the Z axis to be some units above, but is this the right way?
asked Sep 29 '14 at 06:34 PM in Using UE4
Well you could work with a grid system.
I mean you will have similarly large levels right? So check the position of the player, get the nearest point of your grid (you will have to implement this yourself. It's fairly easy though. Just input a variable with the gridsize and check if the current location is closer to which possible camera position and place it there (you can move the camera via vinterp to get a smooth feeling during the transition). Like this the camera will only be able to snap to those grid points but it might do the trick for you and this would mean you can more easily set up more parts of the level and multiple level without additional effort.
You could also do this kind of setup entirely inside of your level moving the camera to set points as soon as you enter a volume. Like this you could also more easily change the distance between your character and the camera (aka making it smaller or larger enabling the player to see more or less of the scene).
answered Sep 29 '14 at 08:44 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here