Camera API

Screen projection and camera functions.

Functions

get_screen_size()

Get the screen dimensions.

local screen = kinetic.camera.get_screen_size()

Returns: Table with width and height

Example:

local screen = kinetic.camera.get_screen_size()
print("Screen: " .. screen.width .. "x" .. screen.height)

-- Draw at center
local center_x = screen.width / 2
local center_y = screen.height / 2
kinetic.draw.circle({center_x, center_y}, {255, 0, 0}, 10)

world_to_screen()

Project a 3D world position to 2D screen coordinates.

Have fun with this.

local screen_pos = kinetic.camera.world_to_screen(x, y, z)

Parameters:

  • x, y, z (numbers) - World coordinates

Returns: Table with x, y, and visible or nil if behind camera

Example:

Complete Example

3D ESP

Next Steps

  • Drawing API - Draw projected positions

  • Players API - Get player positions

Last updated