Camera's Direction Help

Hello, I’m trying to make a camera in which the camera is always facing where the head is facing at.

For example, if I do the flip I want the camera to do a flip as well.

I tried changing the camera subject to the head, but it has no control and the angle doesn’t actually change too. I also searched up a lot of posts, but didn’t get the desired result. Is there any way I can do this?

Thank you.

2 Likes

Have you tried setting the camera orientation to the HumanoidRootParts as it should account for orientation of the character, but setting the position at the characters head? EDIT: Sorry for so many edits, it’s kinda hard to get the right words lmao

Well it’s in first person so the root part can’t move unless the camera moves. Thanks for the response though!

Bump. Here’s an example of what I kind of want. (The emote video)

Bump.‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎

The post you sent has the code in it, is that not what you wanted?

True, it does work, but the only problem is that you can’t move your mouse 360 degrees.

My problem right now is that even if I set the camera’s CFrame to the head, you can’t move the head. So is there a way I can move the camera, while having the camera’s CFrame set as the head’s???

game:GetService("RunService").RenderStepped:Connect(function(delta)
	if c and c:FindFirstChild("Head") then

		local mouse_position = Vector2.new(m.X,m.Y)

		local screen_size = cam.ViewportSize
		local mouse_centre_offset = (mouse_position/screen_size)-Vector2.new(0.5,0.5)

		local mouse_camera_rotation = CFrame.Angles(-mouse_centre_offset.Y, -mouse_centre_offset.X * math.pi * 2, 0)

		cam.CFrame = c.Head.CFrame*CFrame.new(0,0.25,-0.375)*mouse_camera_rotation
	end
end)

this is the furthest i’ve gotten, you can rotate your camera freely, but i cannot get the players character to rotate along with the camera

1 Like

After some tweaking I got a result I’m really happy with. The only thing is there a way I can stop the camera? For example, if I move the mouse on the right it just infinitely turns. I think it’s impossible since you have to have the mouse not locked to the center so as of right now it works. Thanks!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.