-
What do you want to achieve? When I unequip my camera tablet, it faces the direction the Character was facing.
-
What is the issue? Everytime I unequip my tablet it faces the other direction, my goal is to make it face the direction of the character every time you unequip.
-
What solutions have you tried so far? I’ve attempted to fix it but I always get the same exact result, there’s nothing I can find on the Dev forums which is why I’m making this post.
Here is the function that fires every time you unequip the Tablet, what should I do to make the characters camera face the direction that you’re currently facing in the world?
--
local function CameraHumanoid()
coroutine.wrap(function()
task.wait(0.020)
PlayerCamera.CameraType = "Custom"
PlayerCamera.CFrame = CFrame.new(HumanoidRootPart.Position, HumanoidRootPart.Orientation)
Equipped = false
CameraNoise:Stop()
end)()
end
1 Like
It’s doing this because when you go in first person it changes your body rotation to which ever way your screen is looking in first person. I suggest not changing the camera minimum zoom distance to 0.
I’m confused, I didn’t change the camera minimum zoom distance to 0, unless I’m missing something?
Then I suggest you just change the camerasubject instead of changing the CFrame of the camera
I did that before, I just changed it to CFrame for a test, I also noticed something odd, you’re right about the first person thing, it seems to depend on where the camera is in the world, my camera changed rotation/direction depending on the camera I was on.
Try this instead
PlayerCamera.CFrame = CFrame.new((HumanoidRootPart.CFrame*CFrame.new(0,0,10)).p, HumanoidRootPart.Position)
Edit: These position offset values may not be fully accurate, you can adjust them based on the angle you want.
Hi, I’m still getting the same issue.
The easiest way I can think of to solve this is to change the players min and max zoom distance and then change the camera position when the tool is equipped.
Question, what would exactly be the point of changing the fov, also what do you mean by change the min and max zoom distance?, sorry I’m confused.
You can try changing the CameraMinZoomDistance option and CameraMaxZoomDistance so you understand what those options do, it basically sets a limit to how far and how short a players camera can move, 0.5 is the lowest and is 1st person, changing it to anything a little higher will not enable 1st person.
Oh yeah I know what that is now, the game will be first person only when it’s complete, I have it set in third person right now so It’s easier for me to test things out, I don’t know if that will work since the game will be locked in first person.
It’ll should work i believe, instead of setting the game to lock first person mode change both the Min and Max camera zoom distance to 0.5 and make a script change it to 1 or as much as you like when the tool is equipped, when the tool is unequipped just make the script change the Max and Min zoom distance back to 0.5.
For some reason it doesn’t force my camera back in first person, it forces it to third like it should by setting both min and max to 1, but when I unequip it only allows me to scroll back in first person and doesn’t force it.
Oh and here’s a video I forgot to add.
So the default settings on the camera for its (before you equip the tool) Min and Max should be 0 (or 0.5 since that’s the lowest) then when you equip the tool it changes it to 1 (or anything you like). Then when you unequip the tool it should reset your Min and Max back to 0 (or 0.5 like I said).
I will try and fix it, I think I know what I did wrong.
For some reason my max zoom distance stays at 1, when I unequip my min changes to 0.5 but my max is 1, which doesn’t make any sense.
I think I found a fix for that, Just change the mode to lock first person, and when you enter the camera again make it Classic.
uhmm, I guess? Pretty sure that’ll still change the the players body, but if you tried it and it works then nice.
It still doesn’t work
I have no clue what to do.