Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 1.05 KB

File metadata and controls

31 lines (21 loc) · 1.05 KB
title Interacting with Cameras
description Cameras are specialized Locators optimized to orient a player's screen, and can be used to create cutscenes, custom player perspectives, and more. This page explains how to interact with Cameras in your Rig Instance using commands.

{ $frontmatter.title }

{ $frontmatter.description }

Force the Player to Spectate a Camera

As Camera - animated_java:<export_namespace>/as_camera

Runs a command as and at a specific camera's entity.

Arguments

Name Type Description
name String The name of the camera to run the command as.
command String The command to run as the camera.

:::admonition type="info" title="Example"

execute as @e[tag=aj.<export_namespace>.root] run \
  function animated_java:<export_namespace>/as_camera \
    {name: '<camera_name>', command:'spectate @s @p'}

:::