Camera ray trace collision detection?

First off, I apologize for asking, but I’ve searched all over the internet to no avail.

What’s a good way to keep a 3rd person camera from passing through surrounding objects? The desired effect is that the camera will pan in as it collides with the surrounding mesh as to keep the player controlled object in view.

I’m thinking a ray trace where upon ray collision with an object with a specific property the camera jumps to the point of collision, else, it jumps to it’s default position. However I’m new to the BGE and not sure how this can be coded/set up.

There is probably a better way to do this too, but above is just my initial idea.

Any ideas, help, or hopefully solutions will make my day.

Using: Blender 2.74

Yes, thanks a lot, that’s just what I was looking for. Sorry to bother. Thanks a heap!

Np, you’re welcome !