How was the smooth camera movement in the Lil Nas X Concert start place made?

Hi, I just have a rea quick question regarding camera movement in and out of the custom camera type.

At the Lil Nas X Concert start place, if you stood still without moving your camera for a while, your camera would slowly tween to looking at the timer on the stage. If you tried to move your camera or if you moved your character again, it would smoothly tween back to your character and give control of the camera back to you.

How did they make this tween back and forth between camera types with no hiccups? Every time I’ve tried to make a tween that kind of resembles this, I change the camera to a Scriptable CameraType, do the tween, and then give control back to the player by setting it back to Custom. However, whenever I do this, the camera does a slight “hiccup” as it transitions from Scriptable to Custom where it slightly jolts backwards or forwards instead of staying where the tween ended, as seen in the gif below.

https://gyazo.com/b723e6cc265e31995e568895fd72b920

How would I make this smoother so that the camera stays in the same place after giving the player control again? I’ve tried setting the minimum and maximum zoom distances in case that was the issue but it continues to do that after I switch the camera type back over.

2 Likes

Correct me if i’m wrong, but when you change a CameraType from scriptable to Custom, it changes the camera position back to where the camera was before the type changes from custom to scriptable. When you stood still and didn’t move the camera, the camera position was, let’s say, 5 studs away from the head. When the tween back down ends, it stops, say, 4 studs from the head, which is closer than where the player left their camera. When the cameratype changes from scriptable back to custom, it sets the camera position back to five studs because that’s where the camera position was before the cameratype changed

Not entirely sure how to fix, but I think you should try making a variable of the player’s cam pos before tweening away from the player, and when tweening it back, set it to tween to that variable.

I may be understanding the situation wrong, but I think this is it. Either that or I’m dumb.

Oddly enough - had the same thought when I first saw the event, was super easy to get it working though

Just store the initial position before the tween and tween back to it, works like a charm :slight_smile:

3 Likes