|
| 05 Aug 2017 01:42 PM |
How would one lerp the camera's position while keeping it fixated on a subject? Focus ain't working, camera subject isn't doing anything because the camera is set to Scriptable (which I prefer to keep it on.)
|
|
|
| Report Abuse |
|
|
Wrathsong
|
  |
| Joined: 05 Jul 2012 |
| Total Posts: 22393 |
|
| |
|
Grove537
|
  |
| Joined: 05 Feb 2010 |
| Total Posts: 3478 |
|
|
| 05 Aug 2017 02:01 PM |
| I had the same issue and was only able to get it to work by using camera subject and setting the camera to follow. There's probably a cleaner way but it worked for what I needed |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2017 02:28 PM |
Maybe this floats your boat?
repeat wait(0) until game:service"Players".LocalPlayer.Character
local Camera = workspace.CurrentCamera Camera.CameraType = Enum.CameraType.Scriptable
local LockedCoordinates = Vector3.new(0, 10, 0) local Subject = workspace.Part
local start = tick() while wait(0) do -- local a = math.max(math.min(tick()-start, 1)) Camera.CFrame = Camera.CFrame:lerp(CFrame.new(LockedCoordinates, Subject.CFrame.p), a) -- start = tick() end |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2017 04:32 PM |
No help needed anymore, I just use the Interpolate method now (workspace.CurrentCamera:Interpolate(endPos, endFocus, duration)
|
|
|
| Report Abuse |
|
|