Hi, I want to make sort of a wall in my game, that is invisible, but other objects start to appear behind the wall like it was a real visible wall. So if an enemy would lean behind that wall, I would see his upper body, but not lower body because its behind the “invisible” wall and the wall is not seen either. How can I do this? Is there some wicked GL stuff or do I have to figure this out mathematicall by drawing a line to the enemy and then see if the wall is in the path.
I have 2 pictures to illustrate this: