self:is_position_behind
Client
Checks whether a world-space position is behind the camera
Syntax
local result = self:is_position_behind(
position
)Parameters
| Type | Name | Description |
|---|---|---|
vector3 | position | Position in world space to check |
Returns
| Type | Name | Description |
|---|---|---|
bool | result | true if the position is behind the camera, false otherwise |
Examples
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)