Camera collision with obstacles has issues

raingame

New member
Hello there! I have an issue with camera collisions: https://prnt.sc/WhnmthVBh18v

It happens because collided obstacle's collider has Z size set to 0.03, if I increase it to 0.13 camera doesn't goes behind the obstacle and renders the image correctly. But I would prefer a proper fix, so any suggestions hot to fix/improve the calculations? Where should I dive in? Any help will be appreciated! Thanks!
Workaround with size increase: https://prnt.sc/Fal6ncMLmgJR
 
Increasing the cast size is the proper fix for that scenario. If the cast is too small then it won't know that the object on the edge of the view is occluding.
 
Still getting issue when sometimes camera changes its position to the front of obstruction when the character is close enough to it, but still behind it. I'm assuming it's because Camera doesn't check for position?
1663793930201.png
My changes to code fixed a few cases, but still there are issues with that, can you help me, please?
 
I'm not understanding the problem. Can you tell me how to reproduce it within a fresh project?
 
Top