self:is_position_behind

Client

Checks whether a world-space position is behind the camera


Syntax

local result = self:is_position_behind(
    position
)

Parameters

TypeNameDescription
vector3positionPosition in world space to check

Returns

TypeNameDescription
boolresulttrue if the position is behind the camera, false otherwise

Examples

Check if a position is behind the camera
local entity = core.camera.create()

entity:set_active()
core.engine.print("info", entity:is_position_behind({0, 0, -10})) -- false (in front)
core.engine.print("info", entity:is_position_behind({0, 0, 10}))  -- true (behind)

On this page