Skip to main content

StreamingCinematicsServiceClient

This item only works when running on the client. Client

Client half of the streaming-cinematics system. While a cinematic camera is active, feeds the camera position up to the StreamingCinematicsService (throttled) so the server can stream world content in around it -- covering the cases where the player has no character, or the character is far from the camera.

Functions

SetFocus

StreamingCinematicsServiceClient.SetFocus() → ()

Sends a single focus position to the server (or nil to clear). Low-level; prefer StreamingCinematicsServiceClient:PushCameraFocus.

ObserveCurrentCameraPosition

StreamingCinematicsServiceClient.ObserveCurrentCameraPosition(_selfStreamingCinematicsServiceClient) → Observable<Vector3?>

Observes the current camera's position, following Workspace.CurrentCamera as it changes.

PushCameraFocus

StreamingCinematicsServiceClient.PushCameraFocus(
observePositionObservable<Vector3?>?--

Optional override

) → function--

Cleanup; clears the focus when called

Streams world content around a cinematic camera until the returned cleanup runs. Defaults to following the current camera; pass an observable of Vector3? to drive the focus explicitly. Sends are throttled to [SEND_RATE_SECONDS].

Show raw api
{
    "functions": [
        {
            "name": "SetFocus",
            "desc": "Sends a single focus position to the server (or nil to clear). Low-level; prefer\n[StreamingCinematicsServiceClient:PushCameraFocus].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "StreamingCinematicsServiceClient"
                },
                {
                    "name": "position",
                    "desc": "",
                    "lua_type": "Vector3?"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 56,
                "path": "src/streamingutils/src/Client/StreamingCinematicsServiceClient.lua"
            }
        },
        {
            "name": "ObserveCurrentCameraPosition",
            "desc": "Observes the current camera's position, following [Workspace.CurrentCamera] as it changes.",
            "params": [
                {
                    "name": "_self",
                    "desc": "",
                    "lua_type": "StreamingCinematicsServiceClient\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Vector3?>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 64,
                "path": "src/streamingutils/src/Client/StreamingCinematicsServiceClient.lua"
            }
        },
        {
            "name": "PushCameraFocus",
            "desc": "Streams world content around a cinematic camera until the returned cleanup runs. Defaults to\nfollowing the current camera; pass an observable of `Vector3?` to drive the focus explicitly.\nSends are throttled to [SEND_RATE_SECONDS].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "StreamingCinematicsServiceClient"
                },
                {
                    "name": "observePosition",
                    "desc": "Optional override",
                    "lua_type": "Observable<Vector3?>?"
                }
            ],
            "returns": [
                {
                    "desc": "Cleanup; clears the focus when called",
                    "lua_type": "function"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 90,
                "path": "src/streamingutils/src/Client/StreamingCinematicsServiceClient.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "StreamingCinematicsServiceClient",
    "desc": "Client half of the streaming-cinematics system. While a cinematic camera is active, feeds the\ncamera position up to the [StreamingCinematicsService] (throttled) so the server can stream world\ncontent in around it -- covering the cases where the player has no character, or the character is\nfar from the camera.",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 11,
        "path": "src/streamingutils/src/Client/StreamingCinematicsServiceClient.lua"
    }
}