XLQP Gen1
ElementsMedia & visuals

AddViewport

Adds a 3D viewport for a model or instance with optional camera interaction.

AddViewport

What it does

Adds a 3D viewport for a model or instance with optional camera interaction.

When to use it

Use it for item previews, avatars, meshes, or other rotatable 3D content.

ElementFunction:AddViewport(ViewportConfig)

Visuals:AddViewport({
    Name = "Character Preview",
    Object = game.Players.LocalPlayer.Character,
    Height = 220,
    Interactive = true,
    AutoFocus = true,
    Clone = true
})

Behavior and return value

Call this method on the compatible section, tab, panel, or element container shown by the signature. Store the returned value when you need to update, read, or destroy the element later.

Fields marked optional may be omitted. XLQP then uses the method’s built-in default or leaves that feature disabled.