Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

Lower the camera for crouching while allowing it to behave normally?

Asked by 9 years ago

When crouching, the legs move in a way that requires the Character to lower (lowering the Torso's relative position to the HumanoidRootPart). However, while in this position, I need to lower the Camera so that it lines up with the head, as it would normally, if the RootJoint was unchanged.

While changing the CameraSubject to the Head would get it where I want, it makes the Character visible and disallows the rotation of the character through the camera.

Changing the CoordinateFrame only allows me to set the lookVector, not a Position or relative Position.

How would I lower it and still be able to use it as normal? Thanks in advance.

1 answer

Log in to vote
3
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
9 years ago

The Humanoid has a CameraOffset property which is where the Camera is positioned relative to the Torso's object space.

It is usually set to 0, 1.5, 0so that the camera is focusing on the middle of the Head. You could set it higher or lower to move where the camera is relative to the Torso.

0
Ah, wonderful! Much obliged. grimm343 30 — 9y
Ad

Answer this question