self:get_global_position

Client

Retrieves the global position of the static body


Syntax

local position = self:get_global_position()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
vector3positionCurrent global position as {x, y, z}

Examples

Get the global position of a static body
local entity = physics.static.create()
local position = entity:get_global_position()

core.engine.print("info", "Static body position:", util.table.unpack(position))

On this page