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
| Name | Type | Description |
|---|---|---|
| cinematic | cinematic | The cinematic. |
| shot | int | The shot's number, from 1. |
| time | int | Cinematic 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