Function
Moderate
Player:StartCameraFade
Does a camera fade to/from a solid color. Animates automatically
Syntax
my_player:StartCameraFade(from_alpha, to_alpha, duration, to_color, should_fade_audio = false, hold_when_finished = false)
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
from_alpha
|
float | — | Alpha at which to begin the fade. Range [0..1], where 0 is fully transparent and 1 is fully opaque solid color. |
to_alpha
|
float | — | Alpha at which to finish the fade. |
duration
|
float | — | How long the fade should take, in seconds. |
to_color
|
Color | — | Color to fade to/from. |
should_fade_audio
optional
|
boolean | false |
True to fade audio volume along with the alpha of the solid color. |
hold_when_finished
optional
|
boolean | false |
True for fade to hold at the ToAlpha until explicitly stopped (e.g. with StopCameraFade) |