x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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.alt text

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?

Product Version: Not Selected
Tags:
sin título.png (516.1 kB)
more ▼

asked Sep 29 '14 at 06:34 PM in Using UE4

avatar image

DylanVelez
198 38 36 43

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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).

more ▼

answered Sep 29 '14 at 08:44 PM

avatar image

Erasio
5.9k 291 86 293

avatar image DylanVelez Sep 30 '14 at 05:20 AM

Yup making a grid like system did it, thanks :)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question