-
What do you want to achieve?
i want to make is so the camera actually follows the player and if possible can also rotate it
U can take the head tilting system from Rainbow Six Siege as an example of what i want to achieve -
What is the issue?
https://gyazo.com/938c4a6b2d44dc97059b8b6b92309ce1 -
What solutions have you tried so far? ive tried doing some research but i havent found any solutions to this issue, im currently using tween service to change the camera angle and an animation to rotate the character
It looks like you are changing the camera type to something else. You could try making it not change the camera type.
You can multiply the Camera.CFrame every frame while its camera type is custom, and it will be like an offset from the actual CFrame. Like if I do this code, the camera will have an offset of 45 degrees on the Z axis.
local run = game:GetService("RunService")
local camera = workspace.CurrentCamera
local offset = CFrame.Angles(0, 0, math.rad(45))
run.RenderStepped:Connect(function(dt)
camera.CFrame *= offset
end)
2 Likes
that did not seem to work at all, didnt change anything with the camera it just stands still there without changing offset or angle while following the character since its custom
Don’t tween the camera, you have to tween/lerp the offset, not the camera itself.
dont think this will work without scriptable
I Checked it out and worked perfectly fine.