Well that’s not exactly what I meant, ie this supposes that you ‘know’ the object(s) to check.
What I mean is that the objects are expected to ‘rise hand’ by themselves. if they happen to be in the frustum and at distance D, r1<D<r2.
To do so I had in mind an approach based on collision detection (ie with sphere (r1) and a reverse sphere (r2))
but I’m afraid that this is not a smart way in term of performances…
Well… I guess you can extend a PandaNode and use the cull_callback to do the distance maths. Something like that happens in the LodNode I suppose.
You can do that with an RenderAttrib/RenderEffect as well, although you should have some caution because at that time, the cull check has already been made…
But, the simplest you can do is: simply use a task to do the check and raise hands…
I’m not certain I get it correctly: if I set a cull_callback, I suppose I have to set it to all potential objects that may happen to verify the requested distance conditions.
Since I don’t know whose objects will be in this case, I’ll have to do it for all in the scene, right?
So I’m afraid there is a high price to pay in term of performances, don’t you think so?
have a collision body (a cone) located in the frustum at a distance r1 with a cone height of r2-r1.
then isolate each object that has entered (or is still) into collision