object picking

Started by fireside, April 08, 2009, 06:34:35 AM

Previous topic - Next topic

fireside

In my strategy game, object picking seems to work well except when a creature gets behind one of the tree bill boards.  Then, even though the bill board is set unselectable, it seems to interfere with the picking of the creature behind it.  Is there anything I can do about that?

I'm using this code to pick the object:

            SimpleVector s = Interact2D.reproject2D3D(world.getCamera(), buffer, e.getX(), e.getY());
            int[] i = Interact2D.pickPolygon(world.getVisibilityList(), s);
            int t = Interact2D.getObjectID(i);
click here->Fireside 7 Games<-

EgonOlsen

That's desired behaviour...a nonselectable object still acts as a block. If you don't want that, there a another pickPolygon-method that allows you to exclude those object from the process completely.

fireside

click here->Fireside 7 Games<-