Jump to content

[SOLVED] control Entity using ig manager


photo

Recommended Posts

image.png.6c2bdadac08e001f9d08116299feb0c2.png

When an entity is first created through ig_manager, the function does not work in the same frame.

 

sample->getNode()->setWorldPosition(Math::Vec3(-4.62241, -6.44629, 12.84174));   // It works if it exists after the frame.

 

However, functions related to the IEntity class do not work even if after frame.

2.9 version

Edited by dongju.jeong
Link to comment

Hello dongju! 
you need turn off interpolation for work with entity transformation directly without cigi. 

IG::IEntity * sample = AppSystemLogic::ig_manager->getEntity(222);
sample->setType(200);
sample->setInterpolation(0); // <== turn off interpolation
sample->setCollision(1);
sample->setRotationEuler(Unigine::Math::vec3(89, 0, 0));
sample->setGeoPosition(AppSystemLogic::ig_manager->getConverter()->worldToGeodetic(Unigine::Math::Vec3(0, 3, 1500)));

 

  • Like 1
Link to comment
  • silent changed the title to [SOLVED] control Entity using ig manager
×
×
  • Create New...