PortalFace
One side of a Portal (docs/portals.md D2): a scope, the container the face is fixed in, and a pose, an absolute Double3 position in that scope and a rotation.
Nebula · Packages/com.1by3.nebula/Runtime/Containers/PortalTypes.cspublic readonly struct PortalFaceOne side of a Portal (docs/portals.md D2): a scope, the container the face is fixed in, and a pose, an absolute Double3 position in that scope and a rotation. The face's +z axis is the way from the near scope into the far one: in its axes, z < 0 is the near side's region and z ≥ 0 the far side's.
As built, the pose is held in the scope's own absolute space (what ContainerRegistry.ToAbsolutePrecise gives, out of any physics frame the container is in) rather than in the container's local space, which is the form every crossing already compares in; the container is kept for ownership, lookup and the network gateway's rows.
Constructors
PortalFace
public PortalFace(ulong scope, string containerId, Double3 origin, Quaternion rotation);A face.
Properties
Scope
public ulong Scope { get; }The scope the face is in (Container.InstanceId; 0 is the public world).
ContainerId
public string ContainerId { get; }The id of the container the face is fixed in; empty when it is not known yet.
Origin
public Double3 Origin { get; }The face's origin, absolute in Scope.
Rotation
public Quaternion Rotation { get; }The face's axes in Scope's space, normalised and rounded to 10⁻⁶ (docs/portals.md D37).
Forward
public Vector3 Forward { get; }The way through, in the scope's axes.
Methods
ToLocal
public Double3 ToLocal(Double3 absolute);A point of the scope (absolute) in the face's axes: the offset from the origin, turned back by the face's rotation, in double.
ToAbsolute
public Double3 ToAbsolute(Double3 local);A point in the face's axes as an absolute point of the scope.
ToString
public override string ToString();PortalCrossing
Where a cast went through an open portal (docs/portals.md D32): the link, the scope it left and the scope it entered, how far along it the plane was met, and the cast as it continues on the far side, as a point in the far scope's scene (...
PortalHit
One thing a portal query found (docs/portals.md D32): the scope it is in, the collider and the entity, how far along the cast it is, and its point in both the asker's space and the hit scope's.