Hey!
So I was wondering, I don’t know that much about camera manipulation. But how do you make the client’s camera look at an exact position? (Not as in Camera.CameraSubject)
Hey!
So I was wondering, I don’t know that much about camera manipulation. But how do you make the client’s camera look at an exact position? (Not as in Camera.CameraSubject)
You can use CFrame.lookAt()
I’ll try that, I’ll reply with the outcome.
An easy way to replicate this is by changing the CameraType
to Enum.CameraType.Watch
.
If you wish the player to be unable to right-click and drag their mouse (note this will remove the ability to click on certain parts (ClickDetectors), then you could just make a TextButton appear over the whole screen of the player.
I did this recently, put it in a LocalScript.
local Camera = workspace.CurrentCamera
Part =
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = Part.CFrame
Alright, import a local script into the starter player scripts and put this in it,
local cam = workspace.CurrentCamera
cam.CameraType = Enum.CameraType.Scriptable
cam.Focus = part.CFrame
It doesn’t work, am I missing something?
in local script:
local cam = workspace.CurrentCamera
local ccf = cam.CFrame
local lookingAt = workspace.LookAtPart
cam.CameraType = Enum.CameraType.Scriptable
cam.CFrame = CFrame.lookAt(ccf.p, lookingAt.Position)