- Home /
Interface 3D
Hi, I'm on a project and I use some piece of interface (EZGui) I need to use a perspective camera cause I need to have some interface elements with perspective.
How can I do to already have my elements at the good place on my screen ? Cause, whren I move to 16/9 elements are out of field like 16/10; When I use native resolution it's ok. So how can I do ?
I used this :
float fMoveOnAxisX = fWindowsResX - m_nConfigResolutionX;
float fMoveOnAxisY = fWindowsResY - m_nConfigResolutionY;
then I update the position of each elements but they are out of my camera field so anyone got an idae ?
Maybe with some sin and cos tan and object position in 3D view ? Cause with my method I just on X an Y cause according to me Z never change ?!
Answer by SarperS · Jun 29, 2012 at 08:09 AM
EZGUI has a component called "EZ Screen Placement" that protects the positions of UI elements regardless of the aspect ratio.
http://www.anbsoft.com/middleware/ezgui/docs/page14/page31/page31.html
Yeah I used it at the beginning but the interface move with this on it. $$anonymous$$aybe some things are to parameter or maybe cause my interface use perspective camera it's fail ?
For my 2D interface with ortho camera all is fine when I switch resolution. But with my interface on perspective camera it doesn't work :/