DIFF

Camera

Part of WorldCommon

Topics

Enums

Values

ChromAber
ColorGrading
Colors
DepthOfField
Distort
DynamicBlur
FilmGrain
FXAA
GaussFilter
Ghost
Glow
GodRays
HBAO
Medianunused?
None
ORTHOGRAPHIC
PERSPECTIVE
RadialBlur
Rain
RotBlur
SMAA
Snowfall
SSAO
SSRnot available
SunMask
UnderWater
WetDistort

Functions

proto native void GetCamera(int cam, out vector mat[4])Returns current camera transformation
proto vector ProjectVector(int cam, IEntity ent, vector vec)
proto native void SetCamera(int cam, vector origin, vector angle)Changes camera positionmore…
proto native void SetCameraEx(int cam, const vector mat[4])Changes camera matrixmore…
proto native void SetCameraFarPlane(int cam, float farplane)default 160000 unitsmore…
proto native void SetCameraNearPlane(int cam, float nearplane)default 5 unitsmore…
proto native void SetCameraPostProcessEffect(int cam, int priority, PostProcessEffectType type, string materialPath)set postprocess effect to camera To disable effect in some prioroty ppEffect, just set effectName or name to NULLmore…
proto native void SetCameraType(int cam, CameraType type)more…
proto native void SetCameraVerticalFOV(int cam, float fovy)more…
proto native void SetListenerCamera(int camera)sets which camera will be a listener (for sound engine)
proto vector UnprojectVector(int cam, float x, float y, vector dir)

Function Documentation

SetCamera

proto native void SetCamera(int cam, vector origin, vector angle)

Changes camera position

cam
Index of camera
origin
position
angle
orientation

SetCameraEx

proto native void SetCameraEx(int cam, const vector mat[4])

Changes camera matrix


SetCameraFarPlane

proto native void SetCameraFarPlane(int cam, float farplane)

default 160000 units


SetCameraNearPlane

proto native void SetCameraNearPlane(int cam, float nearplane)

default 5 units


SetCameraPostProcessEffect

proto native void SetCameraPostProcessEffect(int cam, int priority, PostProcessEffectType type, string materialPath)

set postprocess effect to camera To disable effect in some prioroty ppEffect, just set effectName or name to NULL

cam
number of camera
priority
priority of effect
type
type of effect
materialPath
material

SetCameraType

proto native void SetCameraType(int cam, CameraType type)

SetCameraVerticalFOV

proto native void SetCameraVerticalFOV(int cam, float fovy)