How to set CameraType back to Custom and maintain position?

In here I zoom out, set Scriptable, “zoom in” the cframe, then back to custom, the camera zooms back out to when it was before i set to scriptable.


How can I make it maintain the position I just set??

2 Likes

Why would you need this? Always do camera scripting on the Scriptable CameraType.

If you want the orbit effect you have on the character when you right click and move the camera, you can use CameraSubject for that.

1 Like

I want to be able to tween the camera (so Scriptable) then allow player to continue post tween. Atm it tweens to specific location, then just resets to what they had before. I wanna force the camera of the player to a set point, so when they gain control again, the cameras focused on what they need to be looking at.

So you want the player to have the ability to move while their camera is locked on something? Isn’t that already possible? The controls don’t get locked unless you manually lock them.

Just tween the camera to a certain point, then switch to the focused part, and just let the player do the rest aka walk to whatever place you put.

Please tell me if im not getting it, sorry, I don’t really understand.

oh wait, I think I get what you mean, so when the tween ends, the camera should be looking to where the player should be going next, correct?

Store the Camera’s CFrame value and re-assign it once the Camera’s CameraType value has been set to Enum.CameraType.Custom.

For my understanding you would want to do this:

So you would want to save the player’s camera CFrame before zooming in, after saving you would want to set then camera to the new position/CFrame you want it to start from. After that tween the camera to the CFrame you saved in a variable and connect a completed function to set the camera back to custom making it look seemless.