Author Topic: object picking  (Read 1917 times)

Offline fireside

  • double
  • *****
  • Posts: 605
    • View Profile
object picking
« 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);
« Last Edit: April 08, 2009, 06:48:52 am by fireside »
click here->Fireside 7 Games<-

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: object picking
« Reply #1 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.

Offline fireside

  • double
  • *****
  • Posts: 605
    • View Profile
Re: object picking
« Reply #2 on: April 08, 2009, 03:00:50 pm »
OK thanks.
click here->Fireside 7 Games<-