Amerio.Stephane Posted January 22, 2021 Share Posted January 22, 2021 Hello, This may be a regression in 2.13.0.1+(patched). I have a GUI with a button that switches the eye position between the pilot and copilot positions. It triggers both an EasyBlend calibration file change and a IG View position change: void MySystemLogic::on_button_pressed(WidgetPtr w) { ... easyBlend->setCalibrationFile(file); auto view = ig->getView(viewId); view->setPosition(pos); view->setRotation(rot); } I have a calibration mesh added in the scene to confirm both easyblend and the view position have been correctly changed. And here is the issue. The above code used to work perfectly fine, but now the view position is not applied (to be exact, in the debug window the view position seems correct but it is not actually applied. I don't understand...) As a quick workaround, I now store the view position in a variable that I use in the update() callback. And now it works again. So it looks like the view->setPosition() is somewhat partially lost when called outsided the update(). void MySystemLogic::on_button_pressed(WidgetPtr w) { ... view->setPosition(pos); //< not actually applied??? view->setRotation(rot); gview = view; gpos = pos; grot = rot; gcount = 1; } int MySystemLogic::update() { if (gcount > 0) { --gcount; gview->setPosition(gpos); //< here it works! gview->setRotation(grot); } return 1; } Is it normal behavior? (I don't think so) Am I missing something? Link to comment
silent Posted January 25, 2021 Share Posted January 25, 2021 Hi Stephane, In 2.13.x we've upgraded EasyBlend integration to the latest one (2.96f) and exposed new methods into the EasyBlend API (it's still missing in the docs, but you can check the include/plugins/UnigineAppEasyBlend.h header for the information): virtual void setEyepoint(const Unigine::Math::dvec3 &position) = 0; virtual Unigine::Math::dvec3 getEyepoint() const = 0; You can try to use setEyepoint altogether with setPosition to see if this helps. If nothing changes - could you please send us your *.ol files and code for the reproduction. We will see what else we can do 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
Amerio.Stephane Posted January 27, 2021 Author Share Posted January 27, 2021 Hi, There is no setEyepoint in my easyblend header. Is this in the official 2.13.0.1 or in a later patch I should already have? Anyway, here is attached a sample project that show the issue. After launch, you'll see a gui with 3 buttons, each change the calibration file and the eye position. As the eye position matches the calibration, the calibration grid displayed must not move in the view: TestView.zip All three buttons should display (more or less) the same image. This is not the case if you comment out the code in the world update() function (2.13.0.1 stock or patched) Link to comment
silent Posted January 29, 2021 Share Posted January 29, 2021 Hi Stephane, We've found the root cause. Thank you for the test scene! A proper fix for this would be available in 2.14 release. Right now your approach is totally OK and you can temporary use it until the next release. EasyBlend plugin update is also scheduled for 2.14 (setEyepoint), sorry for the misleading info. 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
Amerio.Stephane Posted January 29, 2021 Author Share Posted January 29, 2021 Ok, great to know you've found the cause and the files I provided helped. Thanks! Link to comment
Recommended Posts