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"

Side Scrolling camera ( Megaman X6 Like )

alt text


So im trying to replicate a camera similar to what youre seeing in the above GIF

I got most of the hard work done as in, Im alredy checking how " upwards " or downwards the player is from the camera and scroll either up / down. However the method i have a few troubles. But first ill explain how its working

By default the camera doesnt move on the Z axis , it only moves when the player reaches either the maxium height, or goes way too much "below" the camera .

Im projecting the player world location to screen coordinates and then dividing it by the viewport size so i get consistent results regardless of the viewport size. Using that

Then i compare the Y value if its above a specific number ( in my case when the player is somewhat near the upper edge, 0.600 ) i start the scrolling ( Interpolate camera to the player Z plus a few units more so it goes upwards while following him ). Once thats done i start checking the Y value for excess ( The more away he is from the upper edge the higher the value becomes ) so at Arround 0.800 i disable the scrolling since it means the player isnt in the scrolling height anymore..

Then i set the camera Z value to the last player Z on ground

This works fine. however it really messes up when the player:Jumps, Reaches maxium heigh. Then goes below the height ( since the camera follows him ) and then lands on another platform. Since its set to use the LAST player Z on ground the camera goes below the player. and then snaps back once the player lands on the ground as you can see here


Any help is greatly appreciated. Thanks!

Product Version: UE 4.14
more ▼

asked Jan 04 '17 at 07:28 PM in Blueprint Scripting

avatar image

75 15 14 21

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

0 answers: sort voted first
Be the first one to answer this question
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