Hi,
I’m trying to do some camera manipulation which I haven’t done in many updates. So you used to be able to set the camerasubject to a part, set it to cameratype ‘Track’ and still be able to zoom and rotate the camera around the subject.
I’ve now got the following:
Camera.CameraType = Enum.CameraType.Track Camera.CameraSubject = Exterior.PrimaryPart
But when the camera view Exterior, I can no longer zoom and rotate the camera with my mouse.
Is there any way to retain the zoom and rotation capabilities when switching the camera subject from humanoid to a basepart?
Many thanks!
1 Like
I just tested this out in a blank place and it works perfectly for me. Are you sure you’re setting the CFrame and Focus of the camera to the target? I think that’s what you forgot to do.
If you insert a part into workspace and put this code in a LocalScript in a client respository, it works just as you intended.
repeat wait() until game.Players.LocalPlayer.Character
local cam = workspace.CurrentCamera
cam.CameraSubject = workspace.Part
cam.CameraType = Enum.CameraType.Track
cam.CFrame = workspace.Part.CFrame
cam.Focus = workspace.Part.CFrame
4 Likes
Its really weird. I’ve done as you suggested and put in the Focus and CFrame parts, but for some reason, the camera still stays locked/fixed, unable to rotate and zoom.
Your example works perfectly (zooms and everything) but it just won’t work on the part I’ve set it to.
The only difference is the part is (primary part of a model) with all the children of the model welded to the primary part but I don’t see why that would have any affect?
I’ve found the issue. I placed a gui with an escape button (to reset the camera back) and the frame fills the whole screen, but is transparent. This meant my mouse was always over the frame, and hence I couldn’t zoom or rotate. Completely my bad!
Thanks for all your help
1 Like