0 votes

I want to know if the player (Camera) is watching to the sun directly.

asked May 24 in Engine by JulioYagami (632 points)

1 Answer

0 votes
Best answer

You need at least the forward vector of the camera and a position and dimension of your sun.
Then you could model the sun (mathematically) as a sphere and do a ray-sphere intersection test.

answered May 25 by reimgrab (84 points)
selected May 25 by JulioYagami
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.