how to put object 3D on screen 2D ?

I need put a file cube.egg on screen like button GUI, I try put “repatentTo(render2d)”
but nothing show on screen. Please, help me.

  1. Have you tried passing your egg file into the constructor of DirectGUI object, and using that object to display it, as shown here? (See in particular the keyword list towards the bottom of the page, and take note of the related keywords specified nearby.)

  2. If you stick with your current method, your object may simply be off-screen – have you tried setting its position to (0, 0, 0) after you reparent it?

Keep the coordinate system of render2d in mind, the coordinates range from -1 to 1. So, your box needs to be repositioned and/or rescaled to be in that range as well.

You can use obj.getTightBounds() to find out the dimensions of the object.