Camera Cutscene

Okay in short. me and my friend are making a fighting game and we have abilities etc etc

but we want to make a special ability and had the idea to use like “Cutscene” type camera angles BUT problem is. is i have no idea how to make it so that it always happends on person. i know how to make normal cutscene thats not really hard since u can just work with fixed locations, but how do i actually put it so it always looks the same even when the character is somewhere else at the map

Heres the thing, you can always get a pivot location for every location used in a fixed cutscene.

Every fixed position will be a certain distance away from a base position.

What am I saying, english please?

Have a central position for the camera, and have the “fixed” positions saved as offset values to be applied to the central position.

Essentially, something like this:

local corePosition = Vector3.new(20, 20, 20) --// "Central" position
local fixedOffsets = {
Vector3.new(10, 7, 0); -- 30, 27, 20
Vector3.new(-13, 3, 4) -- 7, 23, 24
}

for _, offset in fixedOffsets do
    local CameraPosition = corePosition + offset --// get positions
end

If you’d want to tween the camera, I’d then delve further into table chaos and do a little something like this:

--// I'd use parts around a "center" part so you can actually read cframes from them and get rotation, too.
local fixedOffsets = {
    {
    Vector3.new(10, 2, 0),
    Vector3.new(15, 7, 3),
    };
    {
    Vector3.new(10, 2, 0),
    Vector3.new(10, 2, 0),
    };
}

for _, offset in fixedOffsets do
    local CameraPosition = corePosition + offset[1]
    camera.CFrame = CFrame.new(CameraPosition)
    tweenService:Create(camera, TweenInfo.new(1), {["CFrame"] = CFrame.new(corePosition + offset[2])}):Play()
    task.wait(1)
end

(there’s better methods but this is just an example)

For example about the parts around a “center”:


image
With a setup like that, you’d have a primary part and pivot that to the “center” of the cutscene, then use a pairs loop to go through the cutscene groups, and then another to “step” through the cutscene group.

for i = 1, #cutsceneGroups do
    --// Snap to the first step in the cutscene group
    camera.CFrame = cutsceneGroups["tweenGroup" .. i].step1.CFrame
    --// Go through the rest of the groups parts and tween the camera between them
    for i2 = 2, #cutsceneGroups["tweenGroup" .. i]:GetChildren() do
        tweenService:Create(camera, tweeninfo, {["CFrame"] = cutsceneGroups["tweenGroup" .. i]["step" .. i2].CFrame}):Play()
        task.wait(animtime)
    end
end
1 Like

Aaaah, but how would i make it happen at character? make the torse its center?
what we did now is somewhat simular but instead we have a part animation thats following the player and made the position of that part the camera’s position

(and props btw, never had someone give me an awnser this detailed <3 )

1 Like

How you determine the center is entirely up to you, all it is is a point to pivot around.
For ease you could make it a players HumanoidRootPart, but if you wanted you could do some math to get the middle of the 2 players if thats what you’d desire.