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

How to make camera fixed but still able to look around?

Asked by 4 years ago
Edited 4 years ago

I am making a computer which you interact with to use (same style as fallout 4 computer interaction), but while the camera needs to be fixed in place (already acomplished), i also need it to be able to move to see (and press) the power button. How do i allow the player to look around, while the camera position stays fixed (180 degree vision, not 360.)

My script:

UIS.InputBegan:Connect(function(Keycode)
    if Keycode.keyCode == Enum.KeyCode.E then
        if InRange then
            InUse = true
            Camera.CameraType = Enum.CameraType.Scriptable
            local TwInf = TweenInfo.new(1,Enum.EasingStyle.Quad,Enum.EasingDirection.In,0)
            local EndPlace = {CFrame = PC.CameraPart.CFrame}
            local Anim = game:GetService("TweenService"):Create(Camera, TwInf, EndPlace)
            Anim:Play()
        end
    end
end)

Thanks in advance.

0
do you mean like 2d platformers? royaltoe 5144 — 4y
0
No. Imagine being in a first person game, but you can't move, only look around. User#29786 0 — 4y

Answer this question