M MY Multiplayer: Wiki
Side
Kind

getCinematicShotView

Client

Returns where a shot's camera stands and what it looks at, at a cinematic time, shake included.

vec3, vec3, float, float|false getCinematicShotView(cinematic cinematic, int shot, int time)

Parameters

NameTypeDescription
cinematiccinematicThe cinematic.
shotintThe shot's number, from 1.
timeintCinematic time in ms, from 0 up.

Returns

The position and the target (vec3), the roll and the fov in degrees, or false if the shot does not exist or cannot be worked out now.

A path shot works even with nothing playing. A shot that follows an actor only works during playback and uses where the actor stands now.

Example

local intro = createCinematic("cinematics/intro.cine")
local position, target, roll, fov = getCinematicShotView(intro, 1, 2500)
if position then
    setCameraMatrix(position, target, roll, fov)
end

See also