init(target:plane:options:)
Creates a portal component with a target entity, a single planar definition, and portal options.
Declaration
init(target: Entity, plane: PortalComponent.Plane, options: PortalComponent.Options)Parameters
- target:
A target world entity the portal is looking into.
- plane:
A plane for configuring clipping and crossing features.
- options:
An option set that determines which clipping and crossing features to enable.
Discussion
Use this initializer to toggle clippingMode and crossingMode with the same PortalComponent.Plane.
For new code, prefer init(target:clippingMode:crossingMode:), which lets you configure clipping and crossing independently and supports PortalComponent.ClippingMode.volume(_:) and PortalComponent.CrossingMode.volume(_:) for box-shaped boundaries.