I don’t get the last part of your question.
Angle depends on the zoom?
What angle?
Do u mean the amount of blur?
The angle is effected by how much you zoom in and out so if you are not facing the sun and zoom out it will add the blur anyway (which is bad)
Treat each side as a vector then use the law of cosines
To get the vector you need to get the vertices of 1 edge then you got to get the difference of them.
EX: local vector = (E.Position - C.Position)
local hypotenuse = hypotenuse
local opposite = opposite
local adjacent = adjacent
local oppositeTheta = math.deg(math.acos(opposite.Unit:Dot(hypotenuse) / (hypotenuse.Magnitude * opposite.Magnitude)))
local adjacentTheta = math.deg(math.acos(adjacent.Unit:Dot(hypotenuse) / (hypotenuse.Magnitude * adjacent.Magnitude)))
local hypotenuseTheta = 180 - (oppositeTheta + adjacentTheta) --All triangles in the known universe add up to 180 degrees
Ok am not sure it works but try this.
(Let’s hope my maths textbook is true lol)
While true do
Wait(0.016)
Local pos = Workspace.CurrentCamera.CFrame.Position
Local X = pos.X
Local Y = pos.Y
Local Z = pos.Z
Local aX = math.deg(atan(y/x))
Local aZ = math.deg(atan(z/x))
– we won’t be needing angle y since it’s the rotation which is not required.
Now we have them.
Let’s go to the next part.
Local CFtfs = CFrame.new() * CFrame.angles(math.rad(aX),0,math.rad(aZ))
Local camcf = Workspace.currentcamera.CFrame - Workspace.CurrentCamera.CFrame.Position
If CFtfs == camcf then
– make a new blur effect here
End
End)