@Mnemonic: Yes we use both ways, the 3d geometry for lighting and blocking entities like big vents and pillars, in connection with the 2d walk region, because our actor did not react properly. Unfortunately he even doesn't react on the 2d areas, especially when the scene is scrolling. When the scene is scrolling, the 3d geometry seems to be useless, because it doesn't scroll with the rest. We tried to fix it, with making the blockings bigger, but that doesn't help.
It is possible to switch between 2d and 3d? Where?
@metamorphium: Thanks for that, OK the behaviour of our actor is not really the same. The point is, that he sometimes runs straight through the blockings, when clicking behind him. E.g. we have vent on the roof. This vent is a blocked area, but the roof is longer, the vent is right in the middle, so the actor can walk behind. Unfortunately he goes the direct way - through the vent.
We try your code maybe it helps sometimes is the behaviour different, but the cause the same.