How to get the center position of 3DTileset

How to get the center position of 3DTileset ,I want the camera to turn around when I clicked it.

Hello @zrkcode,

I’m not sure what you mean by needing to turn the camera around when you click on it, but to retrieve the center position of a tileset you need to use C++ since the coordinates will be in double precision. It’s worth noting that the position of the tileset as Unreal displays them will always be at an absolute Unreal location of (0, 0, 0), which will not be the center of the tileset. To calculate the actual center of the tileset, you first need a reference to the tileset ACesium3DTileset* tileset. Then you can do:

std::optional<Cesium3DTiles::BoundingVolume> boundingVolume = 
    tileset->GetBoundingVolume();
if (boundingVolume) {
  glm::dvec3 ecefCenter = boundingVolume->getCenter();
  /* 
  This is the center position of the tileset in ECEF. In order to convert it
  into Unreal coordinates, use the conversion functions on the tileset's
  ACesiumGeoreference actor. 
  */
}

-Nithin Pranesh

Thank you for your reply,it’s very helpful to me.