Hello, I’ve recently started my first 3D game in Unity, and I’m currently trying to set the camera, the position and rotation went just fine using some tutorials of talented people, but the camera keeps going through walls or the floor and I can’t find any solutions for this problem, so here I am at Unity Answers.
I’ve already tried casting a Raycast or Linecast between the character and camera, but when it detects an object that isn’t the player, it’ll just shoot the offset to the minimum, or make the camera have a seizure.
The camera rotates around a pivot, which is the child of the player.
If anyone knows a way to fix this, please let me know.
I look forward to your help!