sascha.schneider Posted April 1, 2020 Share Posted April 1, 2020 Hi, i was using the Unigine::Console::addCommand with Unigine::MakeCallback, to populate our scene with test objects. Inside the callback, i do the following: Code: auto node = Unigine::World::loadNode("<path-to-our-node>.node"); if (!node) return false; node->setWorldPosition(Unigine::Math::Vec3(position.x, position.y, position.z)); auto boundBox = node->getWorldBoundBox(); the boundbox has now values like: Callstack points to: void Unigine::CustomApp::doUpdate() Questions: I did not find any documented limitations - is there any?. It looks to me that loading a node is not supported at this point. Or the updating is not allowed. How can i achieve that an object is loaded and can be afterwards manipulated? Thanks in advance, Sascha Link to comment
morbid Posted April 1, 2020 Share Posted April 1, 2020 Hello Sascha, What's inside this node? Anyway, try the following: Change loadNode to loadNode(node, 0). This will exclude node from cache. Please, write back if this will work. Update spatial tree with World::updateSpatial(); Check this case with 2.11 beta If nothing helps please, build a test scene that we can debug on our side. 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
sascha.schneider Posted April 1, 2020 Author Share Posted April 1, 2020 (edited) 2 hours ago, morbid said: Hello Sascha, What's inside this node? Anyway, try the following: Change loadNode to loadNode(node, 0). This will exclude node from cache. Please, write back if this will work. Update spatial tree with World::updateSpatial(); Check this case with 2.11 beta If nothing helps please, build a test scene that we can debug on our side. Thanks. Hello morbid, thanks for the response. The node contains a ObjectMeshStatic. Unfortunately the proposals did not work. I will set up and upload a sample project. Regards. Edited April 1, 2020 by sascha.schneider Update Link to comment
sascha.schneider Posted April 1, 2020 Author Share Posted April 1, 2020 please check your private messages, i have send the example. Link to comment
morbid Posted April 2, 2020 Share Posted April 2, 2020 I got the scene and reproduced described behavior. We'll give you feedback by Friday. 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
silent Posted April 2, 2020 Share Posted April 2, 2020 sascha.schneider You are calculating bound from the NodeDummy, not the ObjectMeshStatic because In your Flagge.node the first object is: <node type="NodeDummy" id="587780787" name="Flagge"> Since 2.11 NodeDummy objects have no bounds. Please, check the devlog here (Bounds Calculation Changes section): So you need either to: Remove the root dummy object and calculate bounds of the ObjectMeshStatic directly. In that case results will be: added object with bbox max = 0.07 0.10 5.00 OR Use Local Hierarchical Bounds (slower): auto box = node->getHierarchyBoundBox(); In that case results will be: added object with bbox max = 0.40 2.82 5.00 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
sascha.schneider Posted April 2, 2020 Author Share Posted April 2, 2020 1 hour ago, silent said: sascha.schneider You are calculating bound from the NodeDummy, not the ObjectMeshStatic because In your Flagge.node the first object is: <node type="NodeDummy" id="587780787" name="Flagge"> Since 2.11 NodeDummy objects have no bounds. Please, check the devlog here (Bounds Calculation Changes section): So you need either to: Remove the root dummy object and calculate bounds of the ObjectMeshStatic directly. In that case results will be: added object with bbox max = 0.07 0.10 5.00 OR Use Local Hierarchical Bounds (slower): auto box = node->getHierarchyBoundBox(); In that case results will be: added object with bbox max = 0.40 2.82 5.00 Thanks! Hello Silent, Thank you, for that clarification. Will try to rearrange the data. Regards, Sascha Link to comment
Recommended Posts