Top-Down Camera Movement (Using "Middle Mouse Button")

I’m newbie at camera manipulation, and tried a lot of ideas from my head (> 20). Also I have problems with math, and can’t make smart alghoritm. So, example of camera which i want:
want
My best attempt to recreate that (but it still being bad…):
Help

If someone has time, can you answer me how can I do this?
But you can just give me idea how i can do this

I’m using this code (Camera.CFrame):

Camera.CFrame = CFrame.new(Mouse.Hit.p.X / 2, 15, Mouse.Hit.p.Z / 2) * CFrame.Angles(math.rad(-75), 0, 0)

Player is part with player’s nickname
I’ll be grateful for the answer!

1 Like

Maybe look into camera types? The answer is most likely there! Added on with a mouse.Clicked and Unclicked event, to control where the camera moves! Should just be some basic Vector math!

1 Like

Ohh… too hard for me… “basic Vector math”. Ok, I’ll try. But, I’m sure i can’t.

1 Like

Don’t worry! Should just be where your mouse started at, then each render step calculating where the mouse position is in correlation to it, and moving the camera on the X and Y plane based on that!

1 Like

I tried that, but it was laggy and had some bugs (because of my mistakes). But, thanks for motivation. Maybe, I’ll try to make it perfectly.

1 Like

Hi, I know this post is pretty old but I hope you’re still around!!

Did you end up figuring out the script? I’m searching for something exactly like this for my game.