[SOLVED] How to make camera auto change view?

So returning back to my long abandoned game, I’ve some questions that I have never asked yet…
Biggest one, is how would you prevent the camera from looking inside walls?


I’m not talking about scenarios like the one below, only the ones above.

Most games, especially racing games seem to have this problem solved. So how would I fix that here? My camera is currently a chase cam attached to the car.
I would enjoy some help on this one…

1 Like

set the near frustum to something small, like 0.1f.

1 Like

Also, write a chase camera that uses a physical object or collidesWith query to dynamically adjust the range-from-vehicle and/or offset side-to-side to avoid penetrating walls.

Setting the near plane closer can only work so far without creating other side effects.

2 Likes

Thanks, I’ll try these methods.

Here is an example of a ray cast camera, hope it helps.

1 Like