3d to 2d camera transition

I want to make an obby game that plays like a normal obby, but sometimes transitions from a 3d camera to a 2d camera in order to do some obstacles.

My issue is I don’t know how to make a script like that. What would I need to learn to make the script?

I tried making some scripts to do this, but all of them didn’t work

By 2D, I assume you mean a birds-eye view as the camera.

If you want a static view of a camera that doesn’t move, you could setup parts that face downwards that you set your cameras CFrame to once the player reaches that stage.

If you want a dynamic view that follows the player, you would have to do some basic CFrame math to get the position above the player, and point down back at the player. This could be done as such:

local cameraCFrame = CFrame.lookAt(playersHumanoidRootPart.Position, playersHumanoidRootPart.Position + Vector3.new(0, 25, 0))

You would have to set the camera to this every frame for it to be a smooth camera that follows the player. Good luck!

1 Like

how can I make the 3D camera transition into a 2D camera though?

What precisely do you mean by transition? If you want a smooth transition from the player’s camera into the bird-eye view, you could lerp the camera’s cframe.

You would just need to change the cameras cframe, by changing the cameras x axis, then use cframe.look at for the camera to face the player. You can offset the cameras cframe from the character