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. 

2D - How to block camera from going too far left/right?

So basically, for a project for my college, I'm trying to replicate the original Megaman game (or at least a small demo of it).

When the player runs all the way left of a level, the camera stops focusing on the player and stops moving so it doesn't show the wall blocking the out of bounds areaalt text

So say this is the starting position, if he runs left where there is no platform, how do I prevent the camera from following?

Thanks for any help.

Product Version: UE 4.10
Tags:
untitled-1.png (266.4 kB)
more ▼

asked Feb 19 '16 at 08:04 PM in Blueprint Scripting

avatar image

RedRiolu447
3 3 4 7

avatar image rokkie199 Mar 05 '19 at 05:59 PM

Did you ever solve it or does anyone know an answer to this?

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

1 answer: sort voted first

Hey.

I imagine that your camera is currently part of your character blueprint. Meaning the camera is a child of your character. Which means the camera will always follow the character.

If this particular scene/screen is the only screen you want your camera to focus on, you might want to disable or delete the camera attached to your character. Then you can just add a camera to your level and focus it directly on this scene. Once the camera is set it will be stationary and not move when the character moves.

However, if you just want the character to appear at the left edge of the camera instead of being in the middle of the camera, you can use the camera offset feature in your camera's blueprint details.

hope this helps

more ▼

answered Feb 19 '16 at 08:29 PM

avatar image

Mr. Moyo
69 4 6 7

avatar image RedRiolu447 Feb 19 '16 at 08:57 PM

Thanks for the reply -

The level is more than just that scene, it extends right for a bit.

However, if you just want the character to appear at the left edge of the camera instead of being in the middle of the camera, you can use the camera offset feature in your camera's blueprint details.

I want the player to be in the middle apart from a certain point when he goes too far left. The picture attached above will be the starting point, so the camera there is fine. If he goes right, the camera will still focus with him in the middle.

If, however, the player goes left from the starting point (towards the invisible wall), I don't want the camera to move, but stay still. So where the camera is placed in the picture, won't go left at all from that point, if you get what I mean (apologies if you don't, I'm tired :/ )

(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