Jump to content

[SOLVED] eyepoint handling v2.2.1


photo

Recommended Posts

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

post-1459-0-45940400-1462885328_thumb.png

post-1459-0-51646400-1462885339_thumb.png

Link to comment

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:

Link to comment

Hi Andrey

 

As you proposed with the new approach to the logic system it works as expected!

 

Thanks a lot

Renato

Link to comment
×
×
  • Create New...