I am making a basic FPV drone, I need help with the camera

I am making a basic FPV drone that can drop grenades, I mainly need help with stuff related to the camera.

How do I make the camera lock to a part, but still rotate freely? (FIrst person)
How do I make the entire drone assembly look to where my camera is looking?

Actually, I just want a part that can look where I am looking. I’ve already figured out the movement system, I just need the camera figured out and I’m good

You can try CFraming the assembly to match the Camera’s CFrame

part.CFrame = CFrame.LookAlong(part.Position, cam.CFrame.LookVector)

If you want movement on only specific axes you can create a new reference CFrame using CFrame.fromMatrix.

But my camera is locked to the part already, how do I detect mouse rotation input and rotate the part accordingly?

You could set the CameraSubject to the part, this would still allow you to look around, then you could use a loop, or another method to make the part look towards the Camera.

It is supposed to be a firstperson only camera

Yes, CameraSubject allows you to still look around in First Person.

Wait, so I can lock the camera to first person as well?

1 Like

you can set it to first person from starterplayer and change the camera subject.

local Camera = workspace.CurrentCamera
local Drone = "path"

Camera.CameraSubject = Drone

Thanks, I know how to do that.

I’ve never thought of it that way honestly. I’ve just set the camera to force its CFrame to be the CFrame of the camerapart of the drone. This is helpful, thank you a lot

1 Like

Okay, there is now a small issue. The CameraSubject is set, the camera doesn’t follow my character anymore but it doesn’t follow the drone’s CameraPart either.