How do you go about making "smart" 3rd person camera?

Anyone can parent object to camera so it’ll follow it, but such camera would go through walls and do other “funny” things. How do you go about making smart TPP camera, that follows object at fixed distance, but not go through walls?

This is more discussion/ideas post, so I’m posting it here rather than on Answers.

WOW! I think it wiil be incredible. Do you have any ideas how can you make it or who can make it?:slight_smile:

Get your ideas here: http://forum.unity3d.com/threads/16949-WOW-Camera-Movement

Sphere cast works great for me. I suggest you to cast one every frame from the head to the last position with a max distance and move the camera to the hit point.

Maybe the author of this thread has his own ideas.

3dbuzz website had a great set of videos where they went through many levels of thought into how to make a really good 3rd person camera.

They were free videos at the time , They might still be free so go have a look. The most difficult concept they tried to solve was how to adjust the camera when anything else is obstructing the view of the player. ( not going the route of alpha of the items in the way )

That been said a general solution is good but it will never work 100% in all situations. From what I’ve studied in existing games most developers will additionally have triggers in the scene telling the camera to take a very specific translation and rotation to get the best results for that area of game play. ( the camera target activates the triggers … not the camera itself )