I want to use a spear collider to stop camera from going through walls. But as I use a spear collider or physics it falls down. I know that if I use physics I can uncheck ‘use gravity’. But I am not using It because when its parent object falls down from a height, it takes a lot of time for the camera to follow the parent object falling down. There is one more problem, when a parent object hits a wall and is not able to move forward, the camera moves forward until it touches the wall.
Set the rigidbody attached to the camera to be “kinematic” and it won’t move unless you make it do so (that’s what “kinematic” means in the context of Unity).
You can toggle “Use Gravity” off on the rigibody. This way your camera is still able to collide and responds to other physical objects and won’t fall down because of gravity.