I’m currently experimenting and learning about camera manipulation, but I can’t seem to get the ‘Focus’ working on the last part of the script. I have tweened the camera into position, but when the camera moves it also turns, which I do not want it to do. More will be explained in the script and the video below.
Here is a screenshot how everything is positioned in the workspace: https://gyazo.com/37388790fb8436ba6bc52102358ee918
Here is a small video of what is happening to the camera: https://gyazo.com/f034c5dfeab7f7355ad74334a4792e49
I don’t want the camera to turn as you can see in the video, but instead same the same way that it is currently.
Below is the script I am currently using:
-- Variables
local Camera = game.Workspace.Camera
local CameraStart = game.Workspace.CameraStart
local CameraEnd = game.Workspace.CameraEnd
local Block = game.Workspace.Block
local Info = TweenInfo.new(
3, -- length
Enum.EasingStyle.Linear, -- style
Enum.EasingDirection.In, -- direction
0, -- repeat
false, --reverse
0 --delay
)
local Goals =
{
CFrame = CameraEnd.CFrame;
Focus = Block.CFrame -- This is the main part that I am not too sure about, I'm not sure if the focus is working correctly.
}
local MoveCamera = TweenService:Create(Camera, Info, Goals)
-- Move camera
wait(3)
Camera.CameraType = "Scriptable"
Camera.CFrame = CameraStart.CFrame
wait(0.5)
MoveCamera:Play()
I hope that I can find an answer to my solution soon, thanks for anyone who helps!