Skip to main content

Camera

Client Server

Metamethods​

boolean __eq(Camera a, Camera b)​

Methods​

Vec3 ScreenToWorldRay(Vec2 screenRelPos)​

Converts a 2D screen percentage coordinate(i.e from Input:MousePosPerc()) to a 3D world space ray (Vec3), used for determining 3D locations from screen interactions.

Vec2 WorldToScreen(Vec3 worldPos)​

Transforms a 3D world coordinate (Vec3) to a 2D screen space percentage coordinate(range 0-1), useful for positioning ui elements like text above a 3D object on the screen.

Vec3 WorldToScreen3f(Vec3 worldPos)​

boolean IsPointVisible(Vec3 worldPos)​

Properties​

boolean active​

boolean activeInHierarchy​

Object object​

Reference to object instance

Object obj​

boolean isDestroyed​

Indicates whether the object is destroyed (true) or not (false).

string type​

Specifies the object's type as a string, useful for type identification.

boolean onePerObject​

number fovY​

Defines the vertical field of view in degrees

number zNear​

number zFar​

number aspectRatio​