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
parentHudParentBase
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
PlaneScale
Uniform scaling factor applied to the HUD plane (X/Y axes only). Default = 1.
public float PlaneScale { get; set; }
Property Value
RotationAngle
Rotation angle in radians around RotationAxis.
public float RotationAngle { get; set; }
Property Value
RotationAxis
Axis around which the HUD plane is rotated relative to the camera. Default = (0,0,1).
public Vector3 RotationAxis { get; set; }
Property Value
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
UseResScaling
If true (default) and ResScale is applied when IsScreenSpace is true. Compensates for high-DPI displays.
public bool UseResScaling { get; set; }
Property Value
Methods
Layout()
Rebuilds PlaneToWorldRef every frame from the current camera matrix and the node's transformation properties.
protected override void Layout()