I’m trying to build a physical menu on a surphace gui. This needs manipulation of both camera position and part position.
Whenever I change the orientation value to the camera via property selection, it works completely normal. However, when I put the same exact values in a script, it puts the camera at a somewhat 10 degree tilt on the Z axis.
local TS = game:GetService("TweenService")
wait(1)
local plr = game.Players.LocalPlayer
local cam = workspace.CurrentCamera
local r = math.rad
cam.CameraType = Enum.CameraType.Scriptable
cam.CFrame = CFrame.new(Vector3.new(-35,21,49))*CFrame.Angles(r(-16.5), r(-37), 0)
I’ve looked thru the dev hub but I couldnt find a topic related to this issue.
Ive found some issues involving tilt, but this seems different somewhat.
Using tween_service is in the plans, but I am tweening the CFrame. This will make 0 different to the camera tilt bug. By the way I tested it out just incase.
– JUST TEST CODE (formatting is horrid) –
local TS = game:GetService("TweenService")
wait(2)
local plr = game.Players.LocalPlayer
local cam = workspace.CurrentCamera
local r = math.rad
cam.CameraType = Enum.CameraType.Scriptable
local t_info = TweenInfo.new(1.2, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
local t_goal = {
CFrame = CFrame.new(Vector3.new(-35,21,49))*CFrame.Angles(r(-16.5), r(-37), 0)
}
local tween = TS:Create(cam, t_info, t_goal)
tween:Play()