Class CameraPlacement
Namespace: ValveResourceFormat.Renderer.Utils
Assembly: Renderer.dll
Picks where to put the camera when the viewer focuses something.
public static class CameraPlacementInheritance
Fields
PlayerHalfExtents
Hull probed with first: a standing human.
public static readonly Vector3 PlayerHalfExtentsField Value
SmallHalfExtents
Hull probed with second: a small cube representing the camera.
public static readonly Vector3 SmallHalfExtentsField Value
Methods
FindOrbitPosition(Rubikon?, Vector3, float, Vector3)
Finds a camera position orbiting center that is not embedded in world geometry and has a clear line to the target.
public static Vector3 FindOrbitPosition(Rubikon? physics, Vector3 center, float distance, Vector3 boundsSize)Parameters
physics Rubikon?
Physics world to probe against; when null the preferred position is returned as-is.
center Vector3
World-space point the camera should look at.
distance float
Orbit radius that frames the target.
boundsSize Vector3
Dimensions of what is being framed, which decide where the orbit starts and how far out the probes begin.
Returns
The chosen camera position, falling back to the preferred one when the target cannot be seen from anywhere.
PreferredDirection(Vector3)
Direction from the target to the first candidate, which is where the camera ends up unless geometry is in the way. Callers sizing the orbit radius frame the target against this one.
public static Vector3 PreferredDirection(Vector3 boundsSize)Parameters
boundsSize Vector3
Dimensions of what is being framed.

