Cr0ws
|
  |
| Joined: 16 Aug 2013 |
| Total Posts: 1545 |
|
|
| 13 Sep 2015 02:31 AM |
plr = game.Players.LocalPlayer cam = workspace.CurrentCamera cam.CameraType = 6 cam.CameraSubject = workspace.CamPoint1
loop = 1
while loop >= 1 or loop <= 500 do cam.CoordinateFrame = cam.CoordinateFrame*CFrame.new(.08,0,0) loop = loop+1 wait() end
-- Second CameraSubject is called 'CamPoint2' btw
________________________________________________-
I'm trying to get the Coordinate Frame to smoothly move from A to B |
|
|
| Report Abuse |
|
|
Cr0ws
|
  |
| Joined: 16 Aug 2013 |
| Total Posts: 1545 |
|
| |
|
|
| 13 Sep 2015 02:52 AM |
CoordinateFrame = workspace.CurrentCamera.CoordinateFrame CoordinateFrame = CFrame.new(0, 10, -20)
local pos2 = CFrame.new(0, 100, 0) *CFrame.Angles(0, math.rad(90), 0) local dist = math.floor((CoordinateFrame.p - pos2.p).magnitude)
for i=1, dist do workspace.CurrentCamera.CoordinateFrame = CoordinateFrame:lerp(pos2, i/dist) wait() end --workspace.CurrentCamera.CoordinateFrame = CFrame.new(0, 0, 0) |
|
|
| Report Abuse |
|
|
Cr0ws
|
  |
| Joined: 16 Aug 2013 |
| Total Posts: 1545 |
|
|
| 13 Sep 2015 03:10 AM |
| Hey can you analyze what lerp does, I think thats the only term I dont understand |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2015 03:20 AM |
local Point = Instance.new("Part") Point.Anchored = true Point.Parent = workspace
local Point2 = Instance.new("Part") Point2.Anchored = true Point2.CFrame = CFrame.new(0, 0, 10) Point2.Parent = workspace
while true do Point.CFrame = CFrame.new(0, 0, -10) wait(1) for i = 1, 25 do Point.CFrame = Point.CFrame:lerp(Point2.CFrame, i/25) wait(0) end end
|
|
|
| Report Abuse |
|
|
|
| 13 Sep 2015 04:14 AM |
This might be helpful to you:
http://wiki.roblox.com/index.php?title=API:Class/Camera/Interpolate |
|
|
| Report Abuse |
|
|
Cr0ws
|
  |
| Joined: 16 Aug 2013 |
| Total Posts: 1545 |
|
|
| 13 Sep 2015 08:35 PM |
| @0supa Thank you so much dude I appreciate it. |
|
|
| Report Abuse |
|
|