local F=game:GetService("\087\111\114\107\115\112\097\099\101")local t=game:GetService("\082\117\110\083\101\114\118\105\099\101")return{Name="\067\097\109\101\114\097\046\067\070\114\097\109\101 \082\101\097\100\105\110\103",ProblemText="\067\097\109\101\114\097\046\067\070\114\097\109\101 \109\097\121 \112\111\105\110\116 \116\111 \097 \067\070\114\097\109\101 \116\104\097\116 \100\111\101\115 \110\111\116 \109\097\116\099\104 \116\104\101 \114\101\110\100\101\114\101\100 \067\070\114\097\109\101 \119\104\105\108\101 \105\110 \086\082\046 \084\104\105\115 \099\097\110 \114\101\115\117\108\116 \105\110 \108\111\099\097\108 \101\102\102\101\099\116\115 \110\111\116 \109\111\118\105\110\103 \119\105\116\104 \116\104\101 \099\097\109\101\114\097 \097\115 \101\120\112\101\099\116\101\100\046",SolutionText="\073\110\115\116\101\097\100 \111\102 \114\101\097\100\105\110\103 \067\097\109\101\114\097\046\067\070\114\097\109\101\044 \117\115\101 \067\097\109\101\114\097\058\071\101\116\082\101\110\100\101\114\067\070\114\097\109\101\040\041 \116\111 \101\110\115\117\114\101 \116\104\101 \067\070\114\097\109\101 \109\097\116\099\104\101\115 \119\104\101\114\101 \105\116 \114\101\110\100\101\114\101\100\046",OnInfoViewChanged=function(l,B)if B~="\078\079\078\069"then if not l.DemoCFramePart then local t=Instance.new("\080\097\114\116")t.Transparency=.5 t.BrickColor=BrickColor.new("\082\101\097\108\108\121 \114\101\100")t.Size=Vector3.new(1,1,1)t.CFrame=CFrame.new(F.CurrentCamera.CFrame.Position)*CFrame.new(0,0,-10)t.Anchored=true t.CanCollide=false t.Parent=F.CurrentCamera l.DemoCFramePart=t end if not l.DemoGetRenderCFramePart then local B=Instance.new("\080\097\114\116")B.Transparency=.5 B.BrickColor=BrickColor.new("\076\105\109\101 \103\114\101\101\110")B.Size=Vector3.new(1,1,1)B.Anchored=true B.CanCollide=false B.Parent=F.CurrentCamera l.DemoGetRenderCFramePart=B;(coroutine.wrap(function()while B.Parent do B.CFrame=F.CurrentCamera.CFrame*CFrame.new(0,0,-10)t.RenderStepped:Wait()end end))()end else if l.DemoCFramePart then l.DemoCFramePart:Destroy()l.DemoCFramePart=nil end if l.DemoGetRenderCFramePart then l.DemoGetRenderCFramePart:Destroy()l.DemoGetRenderCFramePart=nil end end end}
--[[
TheNexusAvenger

Data for a manual test for using Camera:GetRenderCFrame().
--]]

local Workspace = game:GetService("Workspace")
local RunService = game:GetService("RunService")

return {
    Name = "Camera.CFrame Reading",
    ProblemText = "Camera.CFrame may point to a CFrame that does not match the rendered CFrame while in VR. This can result in local effects not moving with the camera as expected.",
    SolutionText = "Instead of reading Camera.CFrame, use Camera:GetRenderCFrame() to ensure the CFrame matches where it rendered.",
    OnInfoViewChanged = function(self,InfoView)
        --Create or hide the parts.
        if InfoView ~= "NONE" then
            if not self.DemoCFramePart then
                local TestPart = Instance.new("Part")
                TestPart.Transparency = 0.5
                TestPart.BrickColor = BrickColor.new("Really red")
                TestPart.Size = Vector3.new(1,1,1)
                TestPart.CFrame = CFrame.new(Workspace.CurrentCamera.CFrame.Position) * CFrame.new(0,0,-10)
                TestPart.Anchored = true
                TestPart.CanCollide = false
                TestPart.Parent = Workspace.CurrentCamera
                self.DemoCFramePart = TestPart
            end
            if not self.DemoGetRenderCFramePart then
                local TestPart = Instance.new("Part")
                TestPart.Transparency = 0.5
                TestPart.BrickColor = BrickColor.new("Lime green")
                TestPart.Size = Vector3.new(1,1,1)
                TestPart.Anchored = true
                TestPart.CanCollide = false
                TestPart.Parent = Workspace.CurrentCamera
                self.DemoGetRenderCFramePart = TestPart

                coroutine.wrap(function()
                    while TestPart.Parent do
                        TestPart.CFrame = Workspace.CurrentCamera.CFrame * CFrame.new(0,0,-10)
                        RunService.RenderStepped:Wait()
                    end
                end)()
            end
        else
            if self.DemoCFramePart then
                self.DemoCFramePart:Destroy()
                self.DemoCFramePart = nil
            end
            if self.DemoGetRenderCFramePart then
                self.DemoGetRenderCFramePart:Destroy()
                self.DemoGetRenderCFramePart = nil
            end
        end
    end,
}