renato.semadeni Posted May 10, 2016 Share Posted May 10, 2016 Hi there I'm migrating our test sceneries to version 2.2.1 and I'm facing some problems with our eyepoint handling. We have the following structure (see attachment tree) which is shown correctly in the editor (v2.2.1). In the older Version 2.1 we accessed the camera by the following method: Unigine::NodePtr node = Unigine::Editor::get()->getNodeByName("OwnshipEyepoint"); Unigine::NodePtr node = Unigine::Editor::get()->getNodeByName("DevEnv_OwnshipPersecutor"); The second attachment shows part of the *.node file. This code was working in 2.1 and complains now that both NodePtr's are NULL. I have to say, that the OwnshipEyepoint is a NodeDummy in a NodeLayer and attached to it is the PlayerDummy. I couldn't find some changes in the release notes regarding the access to nodes... Thanks for your help, Renato Link to comment
silent Posted May 11, 2016 Share Posted May 11, 2016 Hi Renato, NULL NodePtr's can indicates that you are trying to access Node when the world is not yet loaded (before the init()). But it is hard to say what exactly is going on without a small reproduction sample. Can we check a small sample (based on newly generated project via SDK Browser) to find out the root cause of such behavior? We also highly recommend to use new approach with logic system: https://developer.unigine.com/en/docs/2.2.1/code/execution_sequence/app_logic_systemand place code inside specific functions. 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
renato.semadeni Posted May 11, 2016 Author Share Posted May 11, 2016 Hi Andrey As you proposed with the new approach to the logic system it works as expected! Thanks a lot Renato Link to comment
Recommended Posts