liu.yan Posted December 1, 2016 Share Posted December 1, 2016 “won't get focused” refers that if I click on an editable widget, it won’t allow me to type something into the box, but enters the player’s camera navigation mode. This happens when there are more than one ObjectGui under the click position, or the mouse ray is intersecting multiple objects(they do not have to be coincidence). If this happens, no ObjectGui will enter FOCUS_IN event. How can I solve that? I’m using ObjectGui instead of ObjectBillboard, since labels, images, editable widgets can be easily placed on, and the users can interact with the it freely. Link to comment
silent Posted December 1, 2016 Share Posted December 1, 2016 liu.yan Could you please provide a minimal test scene with this behavior? We will take a look what can be done here. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
liu.yan Posted December 1, 2016 Author Share Posted December 1, 2016 Steps:1. Establish a new unigine project from unigine browser.2. Replace source/AppWorldLogic.cpp with the uploaded file.3. Copy cat.png into the data folder.4. Compile and run, you would see a big block of billboards (ObjectGui with billboard option).5. Fly to some middle point of the billboards. Press ESC to escape flying.6. Click on the Edit Widget on certain billboard.You may notice that there is a great chance the widget won’t get focused. twoFiles.zip Link to comment
liu.yan Posted December 2, 2016 Author Share Posted December 2, 2016 Can you reproduce this problem? Another thing: ObjectBillboard renders very fast while ObjectGui renders much slower: 1000 ObjectGuis with several widgets inside would cause serious performance problem. Is this normal? Link to comment
ded Posted December 2, 2016 Share Posted December 2, 2016 Hi liu.yan,Thank you for the reproduction details.We can confirm the behavior you've described.There's two problems with the ObjectGui we've found.First is the incompatibility between Billboard and Background flags.As you can see the background doesn't behave like a billboard and keeps initial orientation.And the second is a wrong sorting of billboards during the render.In the heavy clutter of ObjectGui as in your sample sometimes the billboard that renders as foremost is not actually closest to the camera.The mouse clicks in this case are still projected correctly and are actually handled by another ObjectGui.This is easier to observe when MouseShow is enabled for all ObjectGui nodes.In your sample this is also aggravated by the fact that canvas size of ObjectGui is larger than the background picture.It can be changed using the setScreenSize() method.I've posted an issue for both of the found bugs.However I'm afraid we don't know any temporary workarounds and I hope you can wait until it'll be fixed in future releases.Regarding your latest question, ObjectGui is inherently slower than simple billboards.This is because there is extra computation relating to the GUI management has to be done every frame.While ObjectBillboards has to update billboards orientation and render them and that's all. Link to comment
liu.yan Posted October 23, 2017 Author Share Posted October 23, 2017 Hi, ded. Is this problem solved ? This function is very important for our applications since it provided with real-time user interaction. So~I'm asking you again. Link to comment
silent Posted October 23, 2017 Share Posted October 23, 2017 Hi Liu, We've fixed several issues with ObjectGUI, but not sure that we did something with focus, sorry. If you still have this issue in 2.6 - please, tell us. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts