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

Can you use CameraOffset to offset the camera at an angle?

Asked by 6 years ago

I am awear that CameraOffset uses vector3, therefore if you can rotate a vector3 value. Then you can Offset at an angle. However I am unsure if this is possible. Any ideas or responses?

1 answer

Log in to vote
0
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
6 years ago
Edited 6 years ago

This property is for offsetting the the CameraSubject's location - Vector3 types do not contain rotation information, if you desire to offset the Camera's location you will have to edit it's CFrame property on the client!


local cam = workspace.CurrentCamera
local offset = CFrame.Angles(0,math.rad(10),0)

cam.CameraType = "Scriptable"

wait()

cam.CFrame = cam.CFrame * offset;
- Note that the Camera's CameraType must be set to Enum.CameraType.Scriptable prior to manipulating it through code.
- Also note that you must set the CameraType back to Enum.CameraType.Custom for it to respond to user-input again.
Ad

Answer this question