Jump to content

Loading a world


photo

Recommended Posts

Hi there,

As a newbee in this IG, how (using C++ project) to just load a world (like Unigine\Unigine SDK Browser\addons\airport_assets_addon_2.15\data\airport_assets.world) and set the camera in the center ? In which file to add it ? 

Thanks

Link to comment

Hi! 
you need to specify path to world in ig_config.xml 

<databases>
	<database id="1" world_name="path/to/world.world" geodetic_origin="0 0 0"/>
</databases>

and after that load database through cigi ig_control packet or through API

 ig_manager->loadDatabase(1);

camera should be in center by default. you can control view througth cigi view_control packet or through API

View * view = ig_manager->getView(0);
view->setPosition(position);

 

  • Like 1
Link to comment

Thanks, but it does not work. Got error with geodetic plugin missing GDAL complaints, etc.

Maybe I am too ambitious.
Have you succeeded in simply loading a FBX object ? I tried using:

node = World::loadNode("H:\Unigine\Unigine SDK Browser\sdks\evaluation_sim_windows_2.15\data\samples\common\fbx\yol.fbx");

and getting: 

Xml::load(): can't load "H:\Unigine\Unigine SDK Browser\sdks\evaluation_sim_windows_2.15\data\samples\common\fbx\yol.fbx" file
World::loadNode(): bad node file "H:/Unigine/Unigine SDK Browser/sdks/evaluation_sim_windows_2.15/data/samples/common/fbx/yol.fbx"

Link to comment
×
×
  • Create New...