Trying to make planet glow align with planet when camera is not centered

I have this planet in my game that I decided to give a glow around the edges to make the atmosphere of it look more realistic. I did this by placing a billboardgui in the middle of the planet with a circle with a gradient at its edge. It looks fine when you look straight at it, but when you look at it from the side the gui is not in line with the planet. This is because of the FOV warp at the edge of the players camera, distorting the planet but keeping the billboardgui completely normal. This can be seen in the second image, where I made the billboardgui always show on top to make it easier to see.

Now my question is, is there a way to know when the planet is near the edge of the player’s camera so I can also warp the billboardgui accordingly, and how would i go about making that?
image

1 Like

Do you want the entire planet to glow?

i want there to be a faint glow around the planet yes

I not a master at these kind of things but I think that you should make the part that you using to make the planet glow transparent until it you see a faint glow.

its not a part that creates the glow, its an image in a billboardgui. I also cannot make a neon part cuz that doesnt emit a glow when theres a decal on it

Modify the transparency of the image you are using to make the planet to glow. Maybe that helps.

itrs not about that. Its about the billboardgui not distorting with the camera’s fov like the planet does. I need to find a way to create a script that dynamically changes the size of the billboardgui so it distorts like the planet does

Try doing CFrame.lookAt() also make sure that the glowing part is the front part of the part.

I don’t know anything about scripting and I won’t be able to help you further.

and then what? how do i calculate the distortion caused by the camera’s fov? how do i know how i should distort the billboard?

Check the camera fov value.

gdfgfdgdfgfdfdg

and then what? what do i do with these values? how do I calculate the distortion??

Check if the camera fov is greater or less than 70.