dongju.jeong Posted February 21, 2019 Share Posted February 21, 2019 I used Ig_templete defualt. be_200's Entity ID is 200 in ig_config.xml. so I created Entity that set id to 200 using Hemu. But nothing happened. in update() of SystemLogic, I used this simple code int count = cigi->getNumHostPackets(); for (int i = 0; i < count; i++) { IG::CIGI::ICigiHostPacket* request = cigi->getHostPacket(i); if (request->getType() == IG::CIGI::CIGI_OPCODE_ENTITY_CONTROL) { IG::CIGI::ICigiEntityControl* EC = dynamic_cast<IG::CIGI::ICigiEntityControl*>(request); IG::IEntity* en = ig_manager->getEntity(EC->getEntityID()); en->setRotationEuler(EC->getRotation()); en->setGeoPosition(EC->getPosition()); } } How create Object Node that related to Entity? Link to comment
cash-metall Posted February 21, 2019 Share Posted February 21, 2019 You need to configure IG according to the documentation: create a terrain with a geodetic pivot, specify the name of the .world file in ig_config.xml EntityControl packet works automaticly, additional processing is not required. 1 Link to comment
dongju.jeong Posted February 21, 2019 Author Share Posted February 21, 2019 (edited) 14 hours ago, cash-metall said: create a terrain with a geodetic pivot Does this mean that the world with terrain made from Geo-referenced data should be designated in the ig_config? if enable Geodetic Pivot, background screen gets a little strange. When making a Terrain, are the common values of the automatically generated GeodeticPivot normal? (if coordinates parameter set to East-North-Up Mode, Common values are automaticly changed.) Or should I set the position and rotation to initialization(0,0,0)? Edited February 22, 2019 by dongju.jeong Link to comment
dongju.jeong Posted February 22, 2019 Author Share Posted February 22, 2019 (edited) 14 hours ago, cash-metall said: EntityControl packet works automaticly, additional processing is not required. Does this mean I don't need to use the SetRotationEuler,SetGeoPosition function of Intity? Is it handled automatically from the inside? Edited February 22, 2019 by dongju.jeong Link to comment
cash-metall Posted February 22, 2019 Share Posted February 22, 2019 Quote Does this mean I don't need to use the SetRotationEuler,SetGeoPosition function of Intity? yes. EntityControl is already supported. Quote Does this mean that the world with terrain made from Geo-referenced data should be designated in the ig_config? yes. you need specificate database name Callbacks for receiving packets are needed only for additional processing, which is not provided for by the IG, for example, creating an UI or other unusual behavior. 2 Link to comment
dongju.jeong Posted February 22, 2019 Author Share Posted February 22, 2019 (edited) thank you cash. I've tried the things you've offered me. Even if I set the latitude and longitude of the plane to camera's position, I can't see plane. Am I using Hemu incorrectly? Edited February 22, 2019 by dongju.jeong Link to comment
cash-metall Posted February 22, 2019 Share Posted February 22, 2019 Did you try to change the environment time? time in UTC0 by default. Sometimes the IG starts at night. Link to comment
dongju.jeong Posted February 22, 2019 Author Share Posted February 22, 2019 (edited) If I change the time, only the background changes to the Star background. By any chance, should be_200 nodereference be placed in world in advance by editor? I want to see the airplane being controlled by Hemu after the airplane is made in front of a fixed camera. Edited February 22, 2019 by dongju.jeong Link to comment
cash-metall Posted February 22, 2019 Share Posted February 22, 2019 Quote By any chance, should be_200 nodereference be placed in world in advance? No, it is not necessary to place nodes in advance. They should be automatically created. I can't understand why you can't create an entity. Do you control the camera manually in your application? Do you use a syncker plugin? Any errors/warnings in log? Please, attach log.html file Link to comment
dongju.jeong Posted February 22, 2019 Author Share Posted February 22, 2019 (edited) I attached IG to VR sample project. (Ig folder, xml file and dll(IG,CIGI,HLA)) I'm not using Syncker, and I'm connect Vive to control the camera. There seems to be no error in the log. log.html Edited February 22, 2019 by dongju.jeong Link to comment
cash-metall Posted February 22, 2019 Share Posted February 22, 2019 I seem to understand. In the config, the type id not the entity id! in hemi type entity 364. change in ig_config id to 364 2 Link to comment
dongju.jeong Posted February 28, 2019 Author Share Posted February 28, 2019 Hi, cash-metall I have another question. Do packets related to CigiIGPacket works automaticly in Basically? should I use "createIGPacket,addIGPacket" function if special operation is required? Link to comment
cash-metall Posted February 28, 2019 Share Posted February 28, 2019 Yes, you can. Most packages are processed automatically, but you can also use "createIGPacket, addIGPacket" methods to implement your host logic, or to implement unsupported packages. 1 Link to comment
Recommended Posts