Render if Object is behind obstacle?

Simply put: The Pink-Arrow Effect from GTA2 - Picture below, under the tags.

In words: When Object becomes obstructed (is behind obstacle), render a Sprite over it (here - the Pink Arrow).

I found the “isVisible” command with all of it’s options, but it only works when something is “in the range” of the Camera View - not checking if it’s behind obstacle or not.

There are some Shaders which can be seen through walls and they are working fine (Silhouette Diffuse, for example). But I found no way to turn them off when the Character “is” seen (so the Arrow is “always” on the character’s head, even without obstacles in way).

And worst of all - it is needed to be used on the Enemies, so they have an indicator (a similar arrow, just red) of where they are, when they stand behind cover.

Help…?

Robertbu was right - using a simple Yield WaitForSeconds coroutine (random float # seconds between 0.4 and 0.5) still makes it CPU-friendly and still everything works well. Thanks a lot! :slight_smile: