Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Camera turn with interpolation to an brick?

Asked by
JoLLDS 5
10 years ago

Hello, i need an script that will turn your camera until a brick, like this:

<-- (camera) O (brick) \ O | O / O --> O


| O / O --> O

Etc

I need it for my fixed version slender model :P

I already tried to script, but it's only turning, won't stop.

I'll take some time to test your help, because my Roblox Studio is saying that my OpenGL aren't updated, but it is.

1 answer

Log in to vote
1
Answered by
Asleum 135
10 years ago

The function you're looking for is Camera:Interpolate, wich makes your camera move smoothly between its current position and a CFrame you provide. Here is an example script :

Camera = game.Workspace.CurrentCamera
Camera.CameraType = "Scriptable"
Camera.Focus = game.Workspace.Part.CFrame
Camera.CoordinateFrame = CFrame.new(game.Workspace.Part.Position + Vector3.new(5, 5, 0), game.Workspace.Part.Position)
Camera:Interpolate(CFrame.new(game.Workspace.Part.Position + Vector3.new(-5, 5, 0), game.Workspace.Part.Position), game.Workspace.Part.CFrame, 3)
0
Ok, when my Roblox Studio bug end, i'll test it ;) JoLLDS 5 — 10y
0
I'll give you credit JoLLDS 5 — 10y
Ad

Answer this question