I basically want to follow a part, and disable camera view rotating. I’m creating a cinematic style tween. Not sure which camera type I should use? And most still allow the camera to be rotated. Or is that a setting I need to disable somewhere? Thanks.
You Usually use either Fixed
or Scriptable
to Create a Cinematic Camera
Off Topic:
Please Mark your Posts as solved instead of just saying [SOLVED]
, It doesnt actually make it solved, you have the mark it as so.
Dont just create a Post of the Same Topic.
Scriptable doesn’t focus on the object. Seems to just freeze camera
local newCam = workspace.CurrentCamera
newCam.CameraType = "Scriptable"
newCam.CameraSubject = workspace:WaitForChild("CameraPart")
Yes, thats the point, its in the name: Scriptable
You script the Camera’s movement instead of it doing it for you
Ah okay, I just preferred using a part since it’s easy to see where it is in object space and I can get coordinates placing it where I want. [Edit: I guess I could just use a parts position though for A and B destination]
How do i mark a post as solved?
click the little tick mark box next to their reply marked solution.
So I’m trying to script the camera to tween from part A to part B…But what’s happening is it’s tweening from my current camera position towards part B and then back when it reverses. What am I doing wrong here? Cause I set the camera subject to Part A
task.wait(2)
local camParts = workspace:WaitForChild("CameraParts")
local a = camParts:WaitForChild("A")
local b = camParts:WaitForChild("B")
local idle = camParts:WaitForChild("Idle")
local newCam = workspace.CurrentCamera
newCam.CameraType = "Scriptable"
newCam.CameraSubject = a
local TweenService = game:GetService("TweenService")
local camera = newCam
task.wait(4)
print("tweening")
local Info = TweenInfo.new(
4, -- Length
Enum.EasingStyle.Sine, -- Easing Style
Enum.EasingDirection.Out, -- Easing Direction
8, -- Times repeated
true, -- Reverse
0 -- Delay
)
local Goals =
{
CFrame = CFrame.new(b.Position)
}
local tween = TweenService:Create(camera,Info,Goals)
tween:Play()
On your last topic, you said you were using a Server Script
, use a LocalScript
and put it inside StarterGui
, Should work after that.
Yea sorry I changed to local script when I instead did your method of tweening camera.
I’ll upload a video real quick 1sec
local Info = TweenInfo.new(
4,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
8,
true, --@ change this to false to make it not reverse
0
)
Thats not his issue, his issue is that its not tweening
Sorry I wasn’t clear, it is tweening. The problem is that instead of tweening from Part A → Part B
It’s instead tweening from my players current camera → Part B
As shown here:
https://gyazo.com/9f0a2d86b913fc80363a794bf365a374
Here is the parts shown in workspace: https://gyazo.com/4dc9fc09c0af95065ccd57778bfb8ae9
Try this out:
task.wait(2)
local camParts = workspace:WaitForChild("CameraParts")
local a = camParts:WaitForChild("A")
local b = camParts:WaitForChild("B")
local idle = camParts:WaitForChild("Idle")
local newCam = workspace.CurrentCamera
newCam.CameraType = "Scriptable"
newCam.CameraSubject = a
newCam.CFrame = a.CFrame
local TweenService = game:GetService("TweenService")
task.wait(4)
print("tweening")
local Info = TweenInfo.new(
4, -- Length
Enum.EasingStyle.Sine, -- Easing Style
Enum.EasingDirection.Out, -- Easing Direction
8, -- Times repeated
true, -- Reverse
0 -- Delay
)
local Goals =
{
CFrame = b.CFrame
}
local tween = TweenService:Create(newCam,Info,Goals)
tween:Play()
Example from one of my scripts:
TweenService:Create(Camera, TweenInfo.new(1,EasingStyle.Sine), {CoordinateFrame = CameraPart.Part2.CFrame}):Play()
Thanks, that’s working. I guess I need to assign the CFrame of the camera before operating the tween?
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.