Issue Spawning Dynamic Slice

Hello, I’m trying to Spawn a Dynamic Slice using the AzFramework::GameEntityContextRequestBus but am getting a error spammed in the logs and no object rendered.

The object I’m trying to Render has a simple Mesh compononent on it with a primitive cube, and then I created a Slice from it, and then set the Slice to Dynamic and am registering it to my Component using the Editor.

The error I’m getting is:

<23:36:16> [Warning] CObjManager::RenderObject: Object has invalid bbox: MeshComponentRenderNode, MeshComponentRenderNode, Radius = 0.00, Center = (80.0,83.0,32.0)

My Code looks like:

    AZ::Transform transform = AZ::Transform::Identity();
EBUS_EVENT_ID_RESULT(transform, GetEntityId(), AZ::TransformBus, GetWorldTM);
AzFramework::SliceInstantiationTicket ticket;
EBUS_EVENT_RESULT(ticket, AzFramework::GameEntityContextRequestBus, InstantiateDynamicSlice, sliceAsset, transform, nullptr);

and sliceAsset is:

AZ::Data::Asset<AZ::DynamicSliceAsset> sliceAsset;

So, I was able to find out the problem, and figured I would post it in case someone runs across a similar issue and can’t find the reason.

Buried in the Log spam was a pos invalid for the AddGeometry, the Transform I was using had a invalid rotation on it and cause it not to render the mesh causing the Mesh Box to be 0.

Amazing! Glad you solved this issue – thanks for sharing :smiley: