www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: manumoi on April 10, 2006, 08:51:29 pm

Title: How to get a 2D position related to an Object3D
Post by: manumoi 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
Title: How to get a 2D position related to an Object3D
Post by: EgonOlsen 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.