Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

game.Workspace.CurrentCamera:Interpolate(Part's CFrame Position, Part's Vector3 lookvector?)

Asked by 9 years ago

I am having a bit of trouble with the :Interpolate function with the camera. I need to use the :interpolate function of the camera to make the camera move smoothly to a part that is transparent. However, I can't seem to figure out how to get the direction the part is facing...here is what I tried

--LocalScript
game.Workspace.CurrentCamera.CameraType = "Scriptable"
game.Workspace.CurrentCamera:Interpolate(game.Workspace.Camerapart.CFrame, game.Workspace.Camerapart.CFrame.lookvector)

Lookvector I know doesn't work because it's a vector3, it needs a CFrame. Is there a way to convert Vector3's to CFrames?

1 answer

Log in to vote
0
Answered by 9 years ago

game.Workspace.CurrentCamera.CameraType = "Scriptable" game.Workspace.CurrentCamera:Interpolate(game.Workspace.Camerapart.CFrame, CFrame.new(game.Workspace.Part.Position+game.Workspace.Camerapart.CFrame.lookVector),1)

the 1 on the end is how long the interpolate lasts.

Ad

Answer this question