Jump to content

[SOLVED] Entity Clamp Mode in v2.13


photo

Recommended Posts

he object disappears when the Clamp mode is changed.

The setTerrainIntersecionMask() function and GlobalTerrain's mask are matched equally.

What did I miss?

//----------------------------------------

When clamp mode is activated, the object is placed much above the terrain height.

Intersections seem to work. But the figures are not normal.

Edited by dongju.jeong
Link to comment

Hello!

we fixed the work of clamp in accordance with the CIGI_ICD
image.png

when clamping, the altitude is not ignored, but is calculated from terrain level.

you can switch the clamp algorithm to the old mode for compatibility

// in AppSystemLogic::init_ig
ig_manager->setGroundClampHeightMode(CLAMP_HEIGHT_MODE::IGNORE);

 

  • Thanks 1
Link to comment

ig_manager->setGroundClampHeightMode(CLAMP_HEIGHT_MODE::IGNORE);

 

setGroundClampHeightMode function is Entity class's function.

 

Is there any way to apply it collectively?

Link to comment

my mistake. Yes exactly. this is a method of the Entity class.
there is no way to set this mode globally.

you can modify this mode by adding a callback
ig_manager->addOnCreateEntityCallback

  • Thanks 1
Link to comment

Sorry, we messed up the signatures

please use the workround:

void AppWorldLogic::HeightMode()
{
	Vector<IG::Entity *> entities;
	IG::Manager::get()->getEntities(entities);
	for (auto & entity : entities)
	{
		if (entity->getType() == 1015)
		{
			entity->setGroundClampHeightMode(IG::Entity::CLAMP_HEIGHT_MODE::IGNORE);
		}
	}
}

we fix this bug in 2.14.0.0

  • Thanks 1
Link to comment
  • silent changed the title to [SOLVED] Entity Clamp Mode in v2.13
×
×
  • Create New...