In many third person RPG's, if the players view is obstructed by a tree or a house, the object in the way fades into transparency and then back out when no longer obstructing.

I am trying to think of a good way to manage this, and I have an idea but I don't know if it is the best way to go about it.

I am running a c_trace from the camera to the player each frame, and I know that if an obstruction occurs, c_trace will set 'you' to that object. That takes care of fading it out, but what about after it is no longer obstructing?

I am thinking of perhaps creating a linked list that tree's would be added to as they obstruct the view. Each element of the list would then represent an object and whether or not it should be fading in or out. If the object is all of the way faded back in, then it would be removed from the list.

Is that overkill, or is that the best way to do this? Any ideas appreciated,

Thanks,


Michael Bartman A6/A7 Commercial Edition Programmer By Nature