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
| Name | Type | Description |
|---|---|---|
| cinematic | cinematic | The cinematic. |
| slot | string | The actor's name. |
| time | int | Cinematic time in ms, from 0 up. |
| adjusted | bool | true 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