Picking ImposterNode

Actually, I'm not sure exactly how this is happening but this is my scenario; I have an imposter node to which I attach a geometry. When loaded, the geometry is not rendered and is replaced by the BillboardNode (with ImposterNode in it) so everything appears to be fine. However, I discovered that I'm still able to pick my geometry that's being faked by the imposter. Why does the imposter node allow picking to the underlying geometry?  Was this a wanted feature of ImposterNode?

Not that I have tried this, but are you sure that it's just not an identical name issue?

basixs said:

Not that I have tried this, but are you sure that it's just not an identical name issue?


Nope, it's definitely not a naming thing. My picking code searches traingle pick results for the parent geometry and then I rotate whatever geometry was picked. I also keep a list of "pickable" geometry and the imposter and billboard nodes aren't in that list, so even if I'm picking the imposter nothing will happen. So the geometry is definitely being picked cause I'm rotating it through my picking actions.

Another observation is that the geometry seems to be occupying the space where it would normally sit, even though the imposter is in use. I know this cause I shrank the imposter's size I was still able to pick the geometry by clicking outside the imposter's bounds. Very strange.

this is what i'd expect, except for picking stuff outside the imposter bounds

HamsterofDeath said:

this is what i'd expect, except for picking stuff outside the imposter bounds


So being able to pick the imposter's underlying geometry through the ImposterNode's Quad is expected? That doesn't seem right  :?

Well, the name is ImposterNode, so name wise it kinda makes sense to me…

basixs said:

Well, the name is ImposterNode, so name wise it kinda makes sense to me...


I thought the ImposterNode was supposed to provide a fake front for the underlying geometry.

And this poses another problem, the "invisible" geometry will be intercepting picking rays and potentially blocking other objects behind them from receiving these clicks. I don't think that's a good feature to have  :'(

true,  maybe you should take a look at the imposter node code; see what's going on there.

you could try setting the contained geometry to uncollidable

haha, I bet that would work too.  :slight_smile:

HamsterofDeath said:

you could try setting the contained geometry to uncollidable


Yup, that works. However this is the expected behavior when using the ImposterNode so I would expect the ImposterNode.attachChild(Spatial) to be setting it by default.

I guess that depends on your expectations of what an imposter node should do.  Some games might want picking and collisions to still work on imposter nodes; something like Serious Sam which can have hundreds of enemies at one time, or even a large scale RPG.