Reads an Unreal-style dynamic array (TArray) and returns its contents as a Lua array of pointers.
Parameters
proc
Process object used for reading game memory.
tarray_address
Integer address of the array in game memory.
max_count(optional, default: 4096)
Maximum number of elements to read. Used as a safety limit.
Returns
A Lua array table indexed from 1 upward, containing integer addresses (pointers).
If anything is invalid (bad address, null pointer, weird count), an empty table is returned.
Example
local actors = unreal_engine.read_tarray(proc, actors_array_addr, 1024)for i, actor_ptr inipairs(actors) do -- actor_ptr is an integer address inside the gameend
unreal_engine.read_minimal_view_info
Reads a camera/view structure and converts it into a normalized Lua table.
Parameters
proc
Process object.
view_info_address
Address of the camera/view information in memory.
Returns
A table with this structure:
If the address or process is invalid, an empty table is returned.
Example
unreal_engine.read_minimal_view_info_f64
Same purpose as read_minimal_view_info, but for layouts that use double-precision values (common in some UE5 setups).
Parameters
proc
Process object.
view_info_address
Address of the camera/view information in memory.
Returns
Same shape as the float version:
If inputs are invalid, returns an empty table.
Example
unreal_engine.world_to_screen
Projects a point from world space to screen space using camera data.
Parameters
world_position
Can be either:
A table: { x = number, y = number, z = number }, or
Three numbers: x, y, z
view_info
The camera table returned from:
unreal_engine.read_minimal_view_info, or
unreal_engine.read_minimal_view_info_f64
Must contain:
Returns
On success (point is in front of the camera):
If the point is behind the camera: nil.
If input is invalid: a Lua error is raised.
Example
Source 2 Helpers (source2)
The source2 table contains helpers for working with Source 2 games.
source2.world_to_screen
Projects a world-space point using a 4×4 row-major view-projection matrix.
Parameters
world_position
Either:
Table { x = number, y = number, z = number }, or
Three numbers: x, y, z
view_matrix16
A Lua array with 16 numeric values:
The matrix should be the combined view-projection matrix for the current camera.
Returns
On success:
If the point is behind the camera: nil.
If view_matrix16 does not contain at least 16 numbers: a Lua error is raised.
Example
Fortnite Helper
A small helper for reading player names in Fortnite.
fortnite_get_player_name
Attempts to read and decode a player name from game memory.
Parameters
proc
Process object.
address
Address pointing to a name-related structure in Fortnite.
Returns
The player name as a string on success.
An empty string "" if:
The process is invalid,
The memory cannot be read safely,
The decoded name is empty.
Example
Rust Helper
A helper for getting world-space transform positions in Rust (Unity).
rust_get_transform_position
Resolves the world-space position of a Unity transform hierarchy used by Rust.
Parameters
proc
Process object.
address
Address of a transform-related structure for a given entity.
Returns
On success: three numbers x, y, z (Lua returns them as multiple values).
On failure (invalid process, invalid address, or any internal error): 0, 0, 0.
{
location = { x = number, y = number, z = number },
rotation = { pitch = number, yaw = number, roll = number },
fov = number
}
local view = unreal_engine.read_minimal_view_info(proc, camera_addr)
if view.fov then
local s = unreal_engine.world_to_screen({ x = 0, y = 0, z = 200 }, view)
-- ...
end
{
location = { x = number, y = number, z = number },
rotation = { pitch = number, yaw = number, roll = number },
fov = number
}
-- Example when you know the game uses a double-precision view structure:
local view = unreal_engine.read_minimal_view_info_f64(proc, view_addr)
local screen = unreal_engine.world_to_screen({ x = 1000, y = 500, z = 150 }, view)
view_info = {
location = { x, y, z },
rotation = { pitch, yaw, roll },
fov = number
}
{
x = number, -- screen X (pixels)
y = number, -- screen Y (pixels)
visible = true
}
local view = unreal_engine.read_minimal_view_info(proc, camera_addr)
local pos = { x = enemy.x, y = enemy.y, z = enemy.z + 80 }
local screen = unreal_engine.world_to_screen(pos, view)
if screen and screen.visible then
-- draw box, text, etc. at screen.x, screen.y
end
local world_pos = { x = 100.0, y = 200.0, z = 50.0 }
local screen = source2.world_to_screen(world_pos, view_matrix)
if screen and screen.visible then
-- draw overlay at screen.x, screen.y
end
fortnite_get_player_name(proc, address) -> string
local name = fortnite_get_player_name(proc, name_struct_addr)
if name ~= "" then
print("Player name:", name)
end
rust_get_transform_position(proc, address) -> x, y, z
local x, y, z = rust_get_transform_position(proc, transform_addr)
if x ~= 0 or y ~= 0 or z ~= 0 then
local screen = unreal_engine.world_to_screen({ x = x, y = y, z = z }, view_info)
if screen and screen.visible then
-- draw marker on that entity
end
end