help plaease how to Highlight a 3d object

Started by zerofox, July 04, 2013, 05:53:41 AM

Previous topic - Next topic

zerofox

Guys,

How to higlight a 3d object? attached is the image what i'm trying to do, you see there is a red ball as the 3d object and i want to higlight this object with the square line black color. how to achieve this? something like 2d drawing that is should know of to draw this line?

Thanks guys

[attachment deleted by admin]

EgonOlsen

You can create a texture that contains the 2d frame and blit it. You can use Interact2D to get some 2d coordinates that relate to the object to know the blitting location.

zerofox

Hi Egon,

Thanks for replying. ok i can use projectCenter3D2Dright to get the center of 3d object to 2d coords and attach the bitmap with square line. But how to get the width and height of the 3d object? i mean i want the hightlighting square line to scale if the 3d object going far or near, so the square line get bigger if the object going near and shrink if going far.

So looks like i need to get the corner top, left corner, right corner, and bottom of 3d object's vertex and using project3D2D to get the width and height? 

EgonOlsen

Either that or, much simpler, scale it according to the distance based on some magic number that depends on the object.