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.

SpringArm3D was designed for this purpose, but from what I've seen from other forum posters it can be a little buggy sometimes. Your success may vary using it. Another option would be to have the camera attached to some sort of physics body that follows the position you want it rather than being childed to the position you want it.

    I made a prototype to zoom in and out of the camera. Everything works fine, but I would like to add smoothness, how can this be achieved?

    MisterLening changed the title to Camera and collision with the landscape | Godot 4.1.2 .

    I made a prototype for my camera movement. I have introduced some restrictions for camera movement (the camera acts as a CharacterBody3D with CollisionShape3D for more flexible camera movement settings (as it seems to me).

    My solution visually looks like this:

    Where the CollisionShape3D is linked by coordinates to my SpringArm3D. This works fine until I want to use the following:

    The bottom line is that I get a CollisionShape3D object naturally in the result, but I would like to ignore it. Do you have any ideas?

      MisterLening params.collision_mask = 32555 i used this, and for some reason it makes an exception for my CollisionShape3D. However, it is not clear how it works... When adding new objects with StaticBody3D and CollisionShape3D, I get ignoring them as well. I need help 🙂