Hi i try to add a geometry to gui node , but it is flat .
I tried to give it same depth as height , but it gave no result.
Soo my question is , is it supposed to be soo (flat ) or there is some thing wrong in what i’m doing
this.node =(Node) menu.getOasis().
getExe().getMyAssetManager().loadModel
("Models/Menu/Tasti/UniversalBotton/UniversalBotton.j3o") ;
Light light= new AmbientLight(ColorRGBA.White);
node.addLight(light);
node.setLocalTranslation(menu.getOasis().getExe().getAppSettings().getWidth() / 2,
menu.getOasis().getExe().getAppSettings().getHeight() / 2, 0);//middle of screen
node.setLocalScale(menu.getOasis().getExe().getAppSettings().getWidth() / 8,
menu.getOasis().getExe().getAppSettings().getHeight() / 4,
menu.getOasis().getExe().getAppSettings().getWidth() / 8);
guiNode.attachChild(node);
this is how guiNode works,
everything in rootNode is perspective projection
everything in guiNode is orthographic projection
also
everything in guiNode 1 unit = 1 pixel
camera location and rotation affects only rootNode view rener
so if you want to have real perspective depth, you should use rootNode.
You will see all sides in guiNode, but like you said, it will be like flat.
please note you could change perspective for both nodes, but it would be not correct.
also images:
perspective:
orthographic:
This is normal behaviour. The issues you are having have nothing to do with the projection. It is the Gui bucket that scales the z coordinate to 0. And the Gui node is in the Gui bucket.
So no, there is nothing wrong with what you are doing
What is it that you like to accomplish?
pspeed
July 6, 2019, 12:09am
5
I think somewhere on the forum there is an example of creating a custom viewport that allows 3d (ortho projected) models without a flattened Z.
Oh… looks like I also added one to the Lemur Demos package:
/*
* $Id$
*
* Copyright (c) 2018, Simsilica, LLC
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived
This file has been truncated. show original