I’m currently stuck on getting the Camera to always line up with the head’s position, instead of the HumanoidRootPart. The reason I want this, is because I have a script that rotates the Waist joint on the Y axis, according to camera rotation (to get the First Person Shooter effect.)
I’m not sure what I’m doing wrong, but when you look straight down, your camera is actually directly above your legs, instead of your Head, and I want the opposite.
The camera subject is actually set to the Humanoid (which then passes on the reference to the HRP I guess?). You should be able to change the camera subject to the head, but I’m not sure how this would affect other behavior.
Changing the CameraSubject to the head makes it so you see your body in first person (which I don’t want.) Not to mention, the “bobbing” of the walking animation is even more amplified when setting it to the Head. The camera also violently shakes with the head movement.
You could bump up the CameraOffset of the Humanoid to make it look like it is anchored to the Head, if you want to maintain the proper humanoid-camera relationship (occlusion in first person, etc)
Not sure if it would work for your specific use case though. You could modify your camera scripts to occlude without the CameraSubject being set to Humanoid (Default behaviour)
The problem with modifying the Camera offset, is that only applies to when the character is standing straight up, otherwise the camera is 12 feet in front of behind a character when they’re looking straight down.
I’ll see if modifying the camerascripts will work.
EDIT: This method works fantastically. It also has character shadows and a full first person body that works perfectly and is exactly what I wanted! Thanks for giving me this idea.
I know I am a bit late to this topic cough cough, 3 years, cough cough. But I am trying to figure out what you mean by “bump up the CameraOffset” like what are the operations I need to do to find the right offset?
CameraOffset simply takes place as a Vector3 value, I’m assuming he meant “bump up” as to increase the “Y” position where the Humanoid’s Camera is at
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local Offset = Vector3.new(0, 10, 0) --This will increase the Camera's Y position 10 studs from its original position I believe
Humanoid.CameraOffset = Offset