Camera Manipulation

Well honestly just that when the mouse thing finish all I ask is finish.

You have to basically use cframes for the cutscene, and make the mouse rotate the camera a bit depending on the mouse location relative to the center of the screen.
I might make a video soon, since you just gave me a awesome idea, stay tunned!

Because I think this kind of people there are tons of people who want like this but maybe they just don’t want to ask on forum or to people

Hold on, I watched your youtube so often… I just realize it, you have very good videos

1 Like

Ahh so basically here I can’t use TweenService anymore for this kind of case?

1 Like

Yep as far as I know, if you use TweenService directly, it will take full control of the cframe while it’s playing which sucks for your use case. Instead you can use TweenService:GetValue which will help you get some animations going.
However you do need to understand a lot of stuff to achieve what you want, but don’t worry, I wanted to make such things when I just started making my cutscene plugin but I didn’t have the experience needed at the time but now you just reminded me!

game:GetService("RunService").RenderStepped:Connect(function()
   for i, v in pairs(CameraScenes:GetChildren()) do
         cam.CFrame = v["1"].CFrame
         cam.CFrame = cam.CFrame:lerp(v["2"].CFrame, 0.5)
   end
end)

Is lerp like this?

1 Like

Lerping need runservice render stepped right? So I supposed it’s gonna have same effect as while true do?

That wouldn’t work, since you’re trying to lerp to all the cameras in one frame

So I have to make it one by one?

Well sorry not to make pressure, is just I really need this to be done ASAP for my group game, that’s why is like I give pressure by asking and asking.

This is a good question. But I have no good answer, you can check everytime if it reaches the destination.

Hold up, am trying to make something for you

Is just i always use tween and this time i get recommend to make it like the game u tried before and for me that’s pretty amazing that’s why i need it ASAP, well I also want to learn more into developing in roblox

But really, sorry for taking much of your time

Hey there, I believe I have a solution for you.
The problem was that you are unable to edit the camera’s CFrame value during the tween, so you would be unable to include the mouse movement aswell.
To overcome this, I simply used a CFrameValue, and tweened the value of that instead of the CameraCFrame.

Code here, inside a Local Script.
local TweenService = game:GetService("TweenService")
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")

local Camera = workspace.CurrentCamera
local Mouse = Players.LocalPlayer:GetMouse()
local CameraScenes = workspace.CameraScenes

local MAX_SCALE = 1000

local Scenes = {
	CameraScenes['1'];
	CameraScenes['2'];
	CameraScenes['3'];
	CameraScenes['4'];
}

repeat task.wait() until Camera.CameraSubject

Camera.CameraType = Enum.CameraType['Scriptable']

local CFrameValue = Instance.new("CFrameValue")
CFrameValue.Value = Scenes[#Scenes].CFrame

RunService:BindToRenderStep("CameraMovement", Enum.RenderPriority.Camera.Value + 1, function()
	local ScreenCenter = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)
	local Distance = Vector3.new(((Mouse.X * -1) - ScreenCenter.X) / MAX_SCALE, (Mouse.Y - ScreenCenter.Y) / MAX_SCALE, 0)
	Camera.CFrame = CFrameValue.Value * CFrame.new(CFrameValue.Value.LookVector + Distance)
end)

while true do
	for _, scene in ipairs(Scenes) do
		local Tween = TweenService:Create(CFrameValue, TweenInfo.new(10), {Value = scene.CFrame})
		Tween:Play()
		Tween.Completed:Wait()
		task.wait(10)
	end
end

I’ve included an Open Source game for you to experiment with aswell, if need be.

https://www.roblox.com/games/8927232714/Camera-Manipulation

I hope this can help you out, let me know of any problems.

1 Like

Correct my bad it should have RenderStepped

Anything new about this? I hope.

This is for one by one part right? But how to make it like i have parts inside models, so like first, tween between parts model 1 and wait 3 seconds and tween between parts model 2, etc.

Also idk why at mine it doesn’t work