2D Camera

Hi

Looked around the net for a while, but not even sure what to search for, so here I ask. :slight_smile:

Busy with a 2D side scroller with a moving background. I have this all set up and working fine, the issue that I have is that I
want the player to start on the left of the screen and the camera to only move once she has got about to the middle of the
screen, this so that if she turns back she can then see where she is going as the camera will stay in the middle of the screen.

The camera is currently connected to the sprite in the sprite BP.

I am using a Tick Event to eliminate the background moving up and down when she jumps.

So…not really sure where to start, should this connected camera be deleted and another separate one be used?

This vid should explain what I am looking to do.

Regards

Sorry for Bump. :o

Anyone?

Here’s what I did: I made a new camera actor. On begin play I spawn the new camera actor and set my new view to it. I do some quick maffs to break up the camera and my locations and add offsets, then vinterp between them. Lastly, for rested behavior, I added a timeline that would scrub from 0 to 1 based on a proximity bool to the camera’s center view and plug that into the vinterp speed. Works OK.
working example: Simple 2D camera behavior - YouTube

Hi Thanks

Sorry so long to reply, between your code and scrounging the net I managed to come right.