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. 

Mario Style Camera

I'm currently trying to recreate a 2d Mario platformer (Super Mario Bros, to be exact) as a small project, to practice some skills, however I'm having a lot of trouble trying to make the camera work for me. Currently he moves in the center of the screen and the camera follows him, but obviously this isn't how other mario games cameras work. I have found no helpful information on this subject so far other than one person who was told to use a grid system to lock the camera to each part of the grid. I unfortunately have no idea how to create such a grid if this is the only way, especially as a 2d platformer (if this is the only way any help would be appreciated since I haven't found a good tutorial for the subject yet). I also want to make sure the camera stops at the edge of the map, so that it cannot be seen. Any help is greatly appreciated.

alt text

This is mine

alt text

How it should be

Product Version: UE 4.9
Tags:
more ▼

asked Oct 18 '15 at 12:18 PM in Using UE4

avatar image

Nath97
16 1 2 5

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

1 answer: sort voted first

So the camera is originally programmed on a pixel by pixel basis. Mario starts 42 pixels from the left side of the platform, with the left side of the camera at 0. As he moves, his left side cannot go further than 112 pixels from the left side of the screen.

more ▼

answered Feb 09 '18 at 02:07 PM

avatar image

MYNameIsNotNert
1

(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