Hey,
I’m trying to set the CFrame of a model to the camera orientation and make sure it only change the Y orientation.
But the results are really bad and it doesnt match the camera orientation, here is the code and a preview.
robloxapp-20220206-1422323.wmv (1.1 MB)
local Angle = Vector3.new(CameraCF:ToEulerAnglesXYZ())
local PitchCFrame:CFrame = Pitch:GetPrimaryPartCFrame()
local X,Y,Z = PitchCFrame:ToEulerAnglesXYZ()
Pitch:SetPrimaryPartCFrame(CFrame.new(StartPitchCFrame.Position) * CFrame.fromEulerAnglesXYZ(X,Angle.Z,Z))
Also, is there a way to get the “Orientation” of the camera like if I did Part.Orientation ?
If someone can help I would love it, thanks.