Vital.sandbox
Model

self:get_position

Shared

Retrieves the current world-space position of the model in 3D world-space


Syntax

local position = self:get_position()

Parameters

TypeNameDescription

Returns

TypeNameDescription
vector3position3D world-space position of the model as {x, y, z}

Examples

Get the world-space position of a model
local entity = model.create("character")
local position = entity:get_position()

engine.print("info", "Entity position:", position[1], position[2], position[3])

On this page