Nebula
Interest

InterestFocus

One place a client is interested in: a point (the usual case, its pawn) or a box (a portal's window, an RTS selection).

generated from the sources
public struct InterestFocus

One place a client is interested in: a point (the usual case, its pawn) or a box (a portal's window, an RTS selection). Positions are absolute world coordinates in double, like every other interest input, so a floating-origin shift changes nothing.

Fields

X, Y, Z

public double X, Y, Z;

HalfX, HalfY, HalfZ

public double HalfX, HalfY, HalfZ;

Half extents; all zero for a point focus.

RadiusScale

public float RadiusScale;

Scales the radius used around this focus (0.5 = half as far). 1 for the usual focus.

SourceNetId

public ulong SourceNetId;

The entity this focus follows, when it follows one (the pawn, an owned unit). 0 otherwise.

Space

public ulong Space;

The region space the focus is in (RegionKeys.FrameKeyOf): 0 for the scope's own space, or a physics frame with regions of its own, whose coordinates X, Y and Z are then in. A focus only sees entities of its own space (docs/container-tree.md D18).

Scope

public ulong Scope;

The scope the focus is in when that is not the client's own (HasScope): a portal's window onto another scope, whose regions are salted with that scope (docs/portals.md D23). A focus with a scope sees only the entities of that scope.

HasScope

public bool HasScope;

Whether Scope is set. A focus without one is in the client's own scope, and the public world is scope 0.

Properties

IsBox

public bool IsBox { get; }

Methods

InScope

public InterestFocus InScope(ulong scope);

This focus, placed in scope scope instead of the client's own (a portal's window onto it).

Point

public static InterestFocus Point(double x, double y, double z, float radiusScale = 1f, ulong sourceNetId = 0, ulong space = 0);

Box

public static InterestFocus Box(double centerX, double centerY, double centerZ, double sizeX, double sizeY, double sizeZ, float radiusScale = 1f);

A box focus, from its center and full size.

SqrDistanceTo

public double SqrDistanceTo(double x, double y, double z);

Squared distance from this focus to a point; 0 inside a box focus.

Scaled

public double Scaled(double radius);

The effective radius around this focus for an entity whose relevance radius is radius.

On this page