Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

[SOLVED] Why is this Camera Manipulation so 'jumpy' and not facing the right way?

I wanted the player's camera to be facing front on, locked to the torso and 50 studs from it, it's really 'trippy' but this the only way I could think of to do this... The problem is, is that the camera is behind the player and not locked so it's 'trippy' and not smooth (but I want it to be smooth...). I'm not very good with manipulating cameras, as those of you who are good with manipulating cameras will be able to tell! Here's my code:

local camera = game.Workspace.CurrentCamera

while wait() do
	local torso = char:WaitForChild("Torso")
	camera.CameraType = "Scriptable"
	camera.CameraSubject = torso
	camera.CoordinateFrame = torso.CFrame+Vector3.new(0,0,50)
	camera.Focus = torso.CFrame
end

I was just wondering how I actually get it to face from the front and if there's a way to make it lock to it without 'jumping'.

2 answers

✓ Accepted answer

If you want it smooth consider using a part to lock the camera to and put a BodyPosition and BodyGyro and update their position using a while wait loop.

1 comment

0

Oh yeah, never thought about that way, thanks for the suggestion!

It is probably because you have it in a while wait() do loop.

And it is probably being caused from this line:

camera.CoordinateFrame = torso.CFrame+Vector3.new(0,0,50)

Try removing that line, if it does not fix the problem, then I can't really help you.

2 comments

0

Do you know any way to make it smooth?

0

Not exactly but I could probably do a bit of experimenting and later on help you. I also think someone is purposely down voting me, because I has 2+ reputation and now I have -6. :/

This discussion is preserved as it was. New answers, comments, and votes are closed.