www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: 9kaywun on August 06, 2012, 10:06:33 am

Title: text above object3d
Post by: 9kaywun on August 06, 2012, 10:06:33 am
I know about text blitting, but what determines the coordinates I would use to place text above models..?
Title: Re: text above object3d
Post by: vickt on August 06, 2012, 04:16:03 pm
What kind of effect are you looking for? Statically sized text above an object that cannot be occluded, or text that appears to be physically above the object and translates with it?

If you're trying to do the latter, the way I would go about this is instead of using blitting, texture a 2d rectangle with bill boarding enabled, and attach it as a child to the object it should be above, then translate it up some number of units until it is above the object.

If you are looking for statically sized text using blittting, this could take some thought.
Title: Re: text above object3d
Post by: EgonOlsen on August 06, 2012, 05:41:31 pm
Interact2D contains some methods to project an Object3D's center to screen coordinates. That should help with the blitting.
Title: Re: text above object3d
Post by: 9kaywun on August 06, 2012, 08:25:19 pm
Thanks for the replies guys.

Interact2D contains some methods to project an Object3D's center to screen coordinates. That should help with the blitting.

That's cool. I'll get it now.