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. 

Is there any way to apply a lag to a Camera?

Hi! I'm working with the Side Scroller template. Is there any way to apply a follow lag to the camera when the player jumps?

I think it can be done using a Lerp, but I'm not sure how to tell the camera since it's inside the component, and of course, it moves with the component itself.

Any ideas?

Thanks! Luke

Product Version: Not Selected
more ▼

asked Apr 11 '14 at 03:31 PM in Blueprint Scripting

avatar image

Luke di Rago
18 4 6 8

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

2 answers: sort voted first

Hey Luke di Rago,

This seems to be the best solution I could come up with. Let me know how it works out for you.

Note: This is within the MyCharacter Blueprint in the Side Scroller Project.

alt text


cameralagbehind.jpg (180.0 kB)
more ▼

answered Apr 12 '14 at 03:48 AM

avatar image

2.1k 75 37 111

avatar image Luke di Rago Apr 12 '14 at 05:10 AM

Awesome!! It worked like a charm. I'm actually needing only a lag in Z axis, when it jumps. I'm gonna try to find a more elegant way to do it, since I started breaking and making vectors and now, as you can see, the wires look a set of headphones in a pocket :P.

I'm making a 'port' of a game I did in a 2D engine, mainly to learn UE4 and keep myself motivated to finish something. You can play it here to get an idea where I'm going http://gamejolt.com/games/arcade/derez-infinite/1749

So I'm using the Sidescroller template, but making the pawn simulate pressing right every tick, and giving the player only the control to jump.

Really, thanks a lot for taking time to help me! :D Luke

alt text

camera_zlag.jpg (173.4 kB)
avatar image PeterLNewton Apr 12 '14 at 06:44 AM

If you break things into variables it may look better haha! But spaghetti is always good! I've looked at Epic nodes and sometimes, its difficult to get things to look just right. Either way I'm glad I could at least get you going!

avatar image DynaMesh Aug 05 '14 at 01:20 PM

Since this thing is spawning a new Camera, I'm losing my ortho width setting (currently in orthographic projection mode), how can I can I put it back ?

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

A more elegant solution in UE4.10 for those who need it is to add a springarm to the Capsule Component of the player Character BP and attach the camera to it. The springarm has settings for Lag (to the left of the screenshot), and you can enable and define lag and separately enable and define camera rotation lag :)

If you want no lag except when the player jumps, I don't believe this will arrange that on its own without also effecting the sideways camera motion :/

alt text

more ▼

answered Mar 30 '16 at 10:20 PM

avatar image

46 1 3 6

(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