PortalComponent invalid

it is my code

let portal = Entity() portal.components[ModelComponent.self] = .init(mesh: .generatePlane(width: Float(size.width), height: Float(size.height), cornerRadius: 0.02), materials: [PortalMaterial()]) portal.components[PortalComponent.self] = .init(target: world) portal.components[PortalComponent.self]?.clippingPlane = .init(position: SIMD3(x: 0, y: 0, z: 0), normal: SIMD3(x: 0, y: 0, z: 0)) portal.components.set(HoverEffectComponent())

I added RealityView to multiple HStacks and implemented the portal effect. I found that the portal effect would cause confusion in the rendering level on some machines, as shown in the figure

this is my code

let portal = Entity()

// 添加 ModelComponent
portal.components[ModelComponent.self] = .init(
    mesh: .generatePlane(
        width: Float(size.width),
        height: Float(size.height),
        cornerRadius: 0.02
    ),
    materials: [PortalMaterial()]
)

// 添加 PortalComponent
portal.components[PortalComponent.self] = .init(target: world)
portal.components[PortalComponent.self]?.clippingPlane = .init(
    position: SIMD3(x: 0, y: 0, z: 0),
    normal: SIMD3(x: 0, y: 0, z: 0)
)

// 添加 HoverEffectComponent
portal.components.set(HoverEffectComponent())

Hi, Thank you for using the Portal API. Could you elaborate on what you mean by "invalid"? It is a bit hard to tell from the screenshot. To be more specific, what you are expecting to see by using this API and what is the unexpected behavior you observed.

PortalComponent invalid
 
 
Q