Okay so first I have read a lot of stuff around before posting this so not just reiterating something. Apologize if some parts are repeat.
So I started with a test project and imported Unity’s default controller and camera packages.
I created a plane and scaled up cube, basically like a wall. I added the 3rd person controller to the scene with the constructor dude and I can run around.
As per the hint on Rigidbodies @ http://docs.unity3d.com/Documentation/Manual/Physics.html
“If you are directly manipulating the Transform component of your object but still want physics, attach a Rigidbody and make it Kinematic.” – Kind of what I want to do with my camera. Move it around and all but I still want collision physics.
So I added a sphere collider of radius 1 to my camera and also added a rigidbody which is set as kinematic.
Also in ThirdPersonCamera.js, I changed LateUpdate to FixedUpdate as it was suggested somewhere to use for kinematic rigid bodies.
After doing these changes I thought the camera would react to physics.
For example, if I rotate my back to a wall and the camera rotates behind me, its moves closer to the guy, instead of penetrating through the wall.
What all am I missing? Is this even a way to achieve what I’m trying to do?
What are your suggestions?