Hello, I've been seeing Interpolate
a lot and just checked it out on the wiki:
Description: Smoothly tweens the camera from the current coordinate frame to the supplied one with the given focus over the duration. Member of: Camera
I want to learn about this, it would go great with my game! Are there any good tutorials, or could anyone explain it?
Well, you just sparked my interest in it. After some toying around and bouncing between Studio and the wiki, it seems that for: Camera:Interpolate(Position, Direction, Time)
, the Camera specified will move to Position, then swing around to face Direction, all as a fluid motion over Time seconds. Things to remember are that Position and Direction are CFrame values, not Vector3 ones. so if you want the camera to move to a certain brick's position and face toward its front your would write:
Camera:Interpolate(Brick.CFrame, Brick.CFrame + Vector3.new(Brick.Rotation), 5) -- this take 5 seconds. Also note that the rotation of a brick has to be added in (for some reason, don't know why).