bounding box geometry doesn't cast/receive shadows

This commit is contained in:
Nick Fisher
2025-03-05 14:57:20 +08:00
parent 593bca3365
commit 5b80dd3a3d
2 changed files with 9 additions and 6 deletions

View File

@@ -263,8 +263,8 @@ class FFIAsset extends ThermionAsset {
@override
Future<void> setBoundingBoxVisibility(bool visible) async {
if (boundingBoxAsset == null) {
final boundingBox = await SceneAsset_getBoundingBox(pointer!);
final boundingBox = await SceneAsset_getBoundingBox(pointer);
final min = [
boundingBox.centerX - boundingBox.halfExtentX,
boundingBox.centerY - boundingBox.halfExtentY,
@@ -343,6 +343,9 @@ class FFIAsset extends ThermionAsset {
keepData: false,
) as FFIAsset;
await viewer.setCastShadows(boundingBoxAsset!.entity, false);
await viewer.setReceiveShadows(boundingBoxAsset!.entity, false);
TransformManager_setParent(Engine_getTransformManager(engine),
boundingBoxAsset!.entity, entity, false);
}