When attaching camera to the character's head, the camera freaks out!

Hi yes as you can tell the title explains it all.

Essentially what I’m doing is every frame, the camera updates to lock onto the character’s head for some special glory kill animations. Here’s a basic frame of what I mean:

-- remember, i update it every RenderStepped
if data.LockCameraToHead == true then
	camera.CFrame = head.CFrame

For some reason, the camera decides to go full monke mode and completely jitters out. Yes, I have checked the animation itself and it is 100% ok and has zero monke spinning. Here’s what I mean:

There is also ZERO camera interference, and the only other thing that’s updating the camera is another side of a if check

Please help!

When you turn the Mouse Sensitivity to 100

This could possibly be due to the Camera detecting for parts that have Colission/Mass, maybe try setting the Green Parts’ Massless property to true?

You could just also set the Camera’s CameraSubject property to the Head instead of having to update it every RenderStepped event

1 Like

Nope, didn’t work. I also tried using the CameraSubject property, but it didn’t end up as expected.

The only thing I could really see is that you’re firing so much changes using RenderStepped, which parts & part physics may work really weird on?

What result did you get by changing the CameraSubject?

The camera stood still, but only the positioning changed (not the rotation)

Okay so I found the issue, it’s because for some reason the character tends to spin while you’re in first person. However, if you’re in 3rd person, it works just fine. Any idea on how to fix this?

EDIT: I have managed to fix the problem by using a hacky workaround, by setting the player’s max-zoom-distance and the min-zoom-distance to something else than first person, then put it back when the glory kill finishes

Kinda weird… but okay I guess…