Jump to content

[SOLVED] Entity Clamp Mode in v2.13


photo

Recommended Posts

Posted (edited)

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
Posted

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
Posted

ig_manager->setGroundClampHeightMode(CLAMP_HEIGHT_MODE::IGNORE);

 

setGroundClampHeightMode function is Entity class's function.

 

Is there any way to apply it collectively?

Posted

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
Posted

AppWorldLogic::init()

{

image.png.e45623e5e14ddc0c45e849ab8a3d0f84.png

 

An error occurs where the "entity" object is used.

Am I using the wrong function?

image.png.32afc90c543b26514fbc270dfbb3007e.png

Posted

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
  • silent changed the title to [SOLVED] Entity Clamp Mode in v2.13
×
×
  • Create New...