Animatable Body

self:get_syncer

Shared

Retrieves the peer id currently holding sync authority over the animatable body

Syntax

local peer_id = self:get_syncer()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
intpeer_idPeer id that syncs this animatable body, 0 when the server itself is the syncer

Examples

Get the syncer of a animatable body
local entity = physics.animatable.create()

core.engine.print("info", "Syncer:", entity:get_syncer())

On this page