Author Topic: How to get a 2D position related to an Object3D  (Read 2080 times)

Offline manumoi

  • long
  • ***
  • Posts: 121
    • View Profile
    • http://www.iro.umontreal.ca/~blanchae
How to get a 2D position related to an Object3D
« on: April 10, 2006, 08:51:29 pm »
Hello,
Dummy question i suppose :shock: . I would like to know how you do to have the 2D position (in the canvas) of a 3D object as it is done in Karga or technopolis to find a position in order to display words said by avatars. I can pick objects (i.e. having coordinates and finding object) but i didn t find the way to do the inversed process

And another small question, do you have a sample of a code used to do transparent dialog panels (in the GL rendering way)?

Thanks all,


Manu

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11744
    • View Profile
    • http://www.jpct.net
How to get a 2D position related to an Object3D
« Reply #1 on: April 10, 2006, 11:26:10 pm »
You can do this by using Interact2D.projectCenter3D2D(...). The upcoming version of JPCT will offer a more flexible solution in addition that works with any vertex, not just with the center of an Object3D.

Transparent GUI-components can be done by using textures with an alpha channel for blitting.