Jump to content

create Entity.


photo

Recommended Posts

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
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.) 

image.png.a019c749edff6ccbeb9225b6c732d2d4.png

Or should I set the position and rotation to initialization(0,0,0)? 

Edited by dongju.jeong
Link to comment

 

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 by dongju.jeong
Link to comment
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.

  • Like 2
Link to comment

thank you cash.

I've tried the things you've offered me.

image.png.238641487912f7d1baba640b86a962c2.pngimage.png.55f704d85afe28a3e4a04792f3a42553.pngimage.png.bb64c9cd1cc2fc4f3b5277038db197b8.png

image.thumb.png.4ad0815251a0f303790f0d04965871a4.png

 

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 by dongju.jeong
Link to comment

If I change the time, only the background changes to the Star background.

image.thumb.png.6a2a8ccc333097eeaf1fab223f1a1dad.png

 

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 by dongju.jeong
Link to comment
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

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 by dongju.jeong
Link to comment

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

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.

  • Like 1
Link to comment
×
×
  • Create New...