Skip to content

GetPrimitiveFeatures doesn't work for instanced tilesets #1700

@j9liu

Description

@j9liu

What happened?

GetPrimitiveFeatures returns an empty primitive features for instanced tilesets. This is because of these lines of code:

UCesiumPrimitiveFeaturesBlueprintLibrary::GetPrimitiveFeatures(
const UPrimitiveComponent* component) {
const UCesiumGltfPrimitiveComponent* pGltfComponent =
Cast<UCesiumGltfPrimitiveComponent>(component);
if (!IsValid(pGltfComponent)) {
return EmptyPrimitiveFeatures;
}

It should also be checking for an UCesiumGltfInstancedComponent, and returning the attached features if found.

Environment

Cesium for Unreal version: v2.16.1
Unreal Engine Version: 5.4
Operating System: Windows

Reproduction steps

  1. Open the sample level 06_CesiumMetadata.
  2. Load the Instanced Orientation tileset from URL.
  3. In the Level Blueprint, recreate this Blueprint:Image
  4. Run the level. Click on any of the cubes. You should see a -1 printed no matter what cube you press. However, the metadata table will be populated with the Height property.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions