M MY Multiplayer: Wiki
Side
Kind

getCinematicActorPose

Client

Returns where an actor stands at a cinematic time. It needs no playback.

vec3, vec3|false getCinematicActorPose(cinematic cinematic, string slot, int time [, bool adjusted = true])

Parameters

NameTypeDescription
cinematiccinematicThe cinematic.
slotstringThe actor's name.
timeintCinematic time in ms, from 0 up.
adjustedbooltrue for the pose with the shifts of setCinematicAdjustments, false for the pose as recorded.default true

Returns

The position and the rotation in degrees, each a vec3, or false if the actor does not exist or is not shown at that time.

Example

local intro = createCinematic("cinematics/intro.cine")
local position, rotation = getCinematicActorPose(intro, "hero", 5000)
if position then
    outputDebugString(("hero at %.1f, %.1f, %.1f facing %.0f"):format(position.x, position.y, position.z, rotation.z))
end

See also