Collision detection help

Imagine a blue moving object and a red moving object. If blue gets close to red and vice versa they will turn no problem, now with the same conditions but this time there is a large static green object to the left of blue, blue turns left to avoid red but ends up going through green object which is so close. Can this be fixed using Logic Bricks?

i think yes.
but i mostly use pytho for such things.
Propably you could use a navmesh combined with a steering actuator for seek and flee.

https://upbge.org/docs/latest/manual/manual/logic/actuators/types/steering.html

Put a near sensor to detect the Object to flee or seek. Create a navmesh where the obstacles are included.

So the Blue or Green should actually flee or seek without running into a wall …

But never tried it