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: Make camera lerp to location, while fixated on subject?

Previous Thread :: Next Thread 
InfiniteYield is not online. InfiniteYield
Joined: 01 Mar 2012
Total Posts: 762
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 is online. Wrathsong
Joined: 05 Jul 2012
Total Posts: 22393
05 Aug 2017 01:51 PM
interpolate with focus?


Report Abuse
Grove537 is not online. 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
juniorjfive is not online. juniorjfive
Joined: 05 Jan 2010
Total Posts: 671
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
InfiniteYield is not online. InfiniteYield
Joined: 01 Mar 2012
Total Posts: 762
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
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