www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: fireside on April 08, 2009, 06:34:35 am

Title: object picking
Post by: fireside on April 08, 2009, 06:34:35 am
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:
Code: [Select]
            SimpleVector s = Interact2D.reproject2D3D(world.getCamera(), buffer, e.getX(), e.getY());
            int[] i = Interact2D.pickPolygon(world.getVisibilityList(), s);
            int t = Interact2D.getObjectID(i);
Title: Re: object picking
Post by: EgonOlsen on April 08, 2009, 07:19:05 am
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.
Title: Re: object picking
Post by: fireside on April 08, 2009, 03:00:50 pm
OK thanks.