Table of Contents

Class CamSpaceNode

Namespace
RichHudFramework.UI
Assembly
RichHudClient.dll

HudSpace node that builds its Plane-to-World matrix directly from the player camera.

In its default state this exactly replicates the vanilla HighDpiRoot transform (screen-space UI). By modifying its properties you can create rotated, offset, or world-space (non-screen-space) HUDs that still follow the camera.

public class CamSpaceNode : HudSpaceNodeBase, IReadOnlyHudNode, IReadOnlyHudSpaceNode, IReadOnlyHudParent
Inheritance
CamSpaceNode
Implements
Inherited Members

Constructors

CamSpaceNode(HudParentBase)

public CamSpaceNode(HudParentBase parent = null)

Parameters

parent HudParentBase

Properties

IsScreenSpace

If true (default), the plane is automatically scaled so that 1 unit on the HUD equals 1 DPI-scaled point at the center of the screen, regardless of FOV or resolution. This reproduces normal screen-space behavior.

public bool IsScreenSpace { get; set; }

Property Value

bool

PlaneScale

Uniform scaling factor applied to the HUD plane (X/Y axes only). Default = 1.

public float PlaneScale { get; set; }

Property Value

float

RotationAngle

Rotation angle in radians around RotationAxis.

public float RotationAngle { get; set; }

Property Value

float

RotationAxis

Axis around which the HUD plane is rotated relative to the camera. Default = (0,0,1).

public Vector3 RotationAxis { get; set; }

Property Value

Vector3

TransformOffset

World-space offset applied to the camera matrix before scaling/rotation. Default places the plane exactly on the camera's near clip plane.

public Vector3D TransformOffset { get; set; }

Property Value

Vector3D

UseResScaling

If true (default) and ResScale is applied when IsScreenSpace is true. Compensates for high-DPI displays.

public bool UseResScaling { get; set; }

Property Value

bool

Methods

Layout()

Rebuilds PlaneToWorldRef every frame from the current camera matrix and the node's transformation properties.

protected override void Layout()