- Home /
How to stop camera from falling down when a collider is added to it
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.
I don't think your organizing this the right way. Your input should only move your player, not the camera it self. The camera should be a child of the player and that would make it not have to use the physics system at all
Answer by tanoshimi · Jun 13, 2016 at 06:34 PM
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).
Answer by ericbegue · Jun 15, 2016 at 02:46 PM
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.
Your answer
Follow this Question
Related Questions
Camera Collision Not Working 0 Answers
why camera does not recognize the collision? 1 Answer
Colliders won't work 0 Answers
Camera gets flung off of the map when the player collides with certain objects. 0 Answers
Smooth Camera 2 Answers