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

How to fix issue?: Changing currentcamera Position is rotating my character.

Asked by 2 years ago

I am making an fps game. And im using the default currentcamera settings except im using FirstPersonLocked of course. And for aiming purposes i want to move the actual camera a bit to the left where the iron sights are. This is where the problem is.

Rotating the camera is fine but changing the position by adding a certain offset like this litteraly rotates the players character model about 120 degrees counter clock wise. Of course you dont see this client side since its first person, but to any players and to the server aiming and trying to move the offset like I said rotates the character model.

workspace.CurrentCamera.CFrame = workspace.CurrentCamera.CFrame * CFrame.new(Vector3.new(.46, 0, -.7))

I did testing and moving the camera in any manner in lockfirstperson moves the character model and i do not want this to be so. I have found the problem is in moving the currentcamera position in first person and I wish to know how to prevent it from rotating the character.

Answer this question