|
| 29 Apr 2016 04:28 PM |
Does anybody know why 'Camera:Interpolate(CamPos, Focus, Duration)' doesn't work any more? It fires and moves the camera a tiny bit, but then that's all it does; it never reaches its destination. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
WoolHat
|
  |
| Joined: 19 May 2013 |
| Total Posts: 1873 |
|
|
| 30 Apr 2016 07:35 AM |
Only doesn't work in studio. Try it in a server and it works. If you're using it in the command bar, hold down enter and it will move your camera to the position.
Pro tip: you can say "bump" instead of firing a snooty remark. |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2016 08:15 AM |
I tried it in a server and it still didn't work. So I wrote my own:
function Interpolate(CameraObject, NewPos, NewFocus, Duration) local Pos, Focus = CameraObject.CoordinateFrame, CameraObject.Focus local RepTime = (1/(Duration/wait())) local Reps = 0 for i = 0, 1, RepTime do i = math.sin(math.rad(90)*i) local cam = Pos.p:lerp(NewPos.p, i) local foc = Focus.p:lerp(NewFocus.p, i) CameraObject.CoordinateFrame = CFrame.new(cam, foc) wait() end end |
|
|
| Report Abuse |
|
|
WoolHat
|
  |
| Joined: 19 May 2013 |
| Total Posts: 1873 |
|
|
| 30 Apr 2016 11:06 AM |
| You must have been doing something wrong, then. Interpolate still works on all servers, and even in new servers. Are you using a server script or localscript? Are you sure the block of code is being run when you are testing on a game server? (Not server testting mode, as that also does not work) |
|
|
| Report Abuse |
|
|