Been working on a custom camera although it only worked while facing forward so i’ve tried using VectorToWorldSpace but it ended up locking the camera behind the character rather than what i intended for it to do
local CameraPos = root.Position + Vector3.new(0,5.5,10) -- put this out of the loop
local MoveDirection = Humanoid.MoveDirection -- self explanatory
if MoveDirection.Magnitude > 0.1 then
CameraPos = root.Position + Vector3.new(MoveDirection.X*-10, 5.5, MoveDirection.Z*-10)
end
ts:Create(CamPart,TweenInfo.new(1),
{Position = CameraPos}):Play()
Another solution is to just make the tween faster, since default Roblox WalkSpeed is measured in Studs Per Second, you need to make the Tween faster depending on the WalkSpeed. For example, it seems that you’re using the default WalkSpeed which is 16 Studs Per Second, and the Camera offset seems to be only 10 Studs in the Z Axis, and because the Tween is 1 second long, the Camera will be behind the Character by 6 Studs when the Character is walking towards the camera.
But whenever you’d go backwards, of course, it would cause the issue i’ve shown previously with the camera trying to face the front of the character rather than behind
Yeah. Like i said, the Character Moves at 16 Studs per Second and the Camera moves at 10 Studs Per Second. So, if the Character moves backwards/towards the camera then the Camera will be Behind the Character by 6 Studs. Try making the Tween faster or the Character Humanoid Speed to 10 or below.
Tried to script something on studio, but ended up getting the same problem. At some point when the Camera is close to the Character, it starts glitching out. Not sure if there’s a way to solve it, guess we’ll just wait till someone gives out an answer.
I think I’ve found a way to kinda fix it by adjusting the offset when the humanoidrootpart and camera are at similar magnitudes, but it doesn’t feel natural and even messes up other elements.