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 » Scripting Helpers
Home Search
 

Camera Manipulation - Interpolation Question

Previous Thread :: Next Thread 
MidnightDeveloper is not online. MidnightDeveloper
Joined: 08 Feb 2014
Total Posts: 1671
24 Jun 2014 06:14 PM
How do I get the camera to interpolate with the target (2nd parameter) of a moving object?
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
24 Jun 2014 06:16 PM
You mean interpolate to a moving target? You could write your own function to do it.
Report Abuse
MidnightDeveloper is not online. MidnightDeveloper
Joined: 08 Feb 2014
Total Posts: 1671
24 Jun 2014 06:18 PM
I don't understand how I could write such a function as I am new to camera manipulation. Here's my code:

*****************
part1CFrame = game.Workspace.c1.CFrame
part2CFrame = game.Workspace.c2.CFrame
local camera = workspace.CurrentCamera
camera.CameraSubject = workspace.BasePlate
camera.CoordinateFrame = part1CFrame
camera.CameraType = "Scriptable"
for i = 1, 100 do
wait()
camera.CoordinateFrame = camera.CoordinateFrame - Vector3.new(0, 0, 0.1)
end
camera:Interpolate(game.Workspace.c2.CFrame, game.Workspace.lookEffect.CFrame, 4)
*****************

On the last line, I want the CFrame of the 2nd parameter to always stay updated until the time (3rd parameter) runs out.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
24 Jun 2014 06:21 PM
So you do mean interpolate to a moving part, then?
Report Abuse
MidnightDeveloper is not online. MidnightDeveloper
Joined: 08 Feb 2014
Total Posts: 1671
24 Jun 2014 06:22 PM
I suppose so, yes.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
24 Jun 2014 06:29 PM
Hmm, you would have to create your own function, using matrix interpolation.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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