- Edited
Hi! The problem is with the camera and creating a collision with the object. My game world is open with a top view (as in strategy).
I was looking for a solution, after learning that RayCast3D exists, I used it to determine a collision with my terrain. And this partially solves my problem (1 screenshot)
However, I would like my camera to either rise or move away from the landscape after a collision, depending on the tilt. For example: I have collided with a mountain and my camera is pointing directly at it, and I would like it to rise depending on the direction of the camera (up or down).
My question is rather in the idea or plan of implementing such functionality, thank you all in advance.