generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Camera Point A to B

Previous Thread :: Next Thread 
Cr0ws is not online. 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 is not online. Cr0ws
Joined: 16 Aug 2013
Total Posts: 1545
13 Sep 2015 02:48 AM
Nothing?
Report Abuse
GoogleAnalytics is not online. GoogleAnalytics
Joined: 08 Aug 2008
Total Posts: 455
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 is not online. 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
GoogleAnalytics is not online. GoogleAnalytics
Joined: 08 Aug 2008
Total Posts: 455
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
0supadude0 is not online. 0supadude0
Joined: 11 Aug 2010
Total Posts: 649
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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image