Перейти к содержанию

Camera::getFov

Материал из RAGE MP Wiki Archive
Версия от 23:31, 11 декабря 2020; imported>Flasbing (Example)
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)

Syntax

<syntaxhighlight lang="javascript">camera.getFov();</syntaxhighlight>

Required Arguments

Return value

  • float

Example

This example creates a camera and if the current Field of View of it is less than or equals to 10 destroys the camera. <syntaxhighlight lang="javascript"> let camera = mp.cameras.new('default', new mp.Vector3(-485, 1095.75, 323.85), new mp.Vector3(0,0,0), 40); // Creates the camera camera.setActive(true); let currFov = camera.getFov(); if (currFov <= 10) {

 camera.destroy();

} </syntaxhighlight>

See also