1. Rigs
  2. Interacting with Cameras

Rigs

Interacting with Cameras

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.

Force the Player to Spectate a Camera

Example
foo/as_root.mcfunction
        execute \
  # Get the root entity context
  as @e[tag=aj.global.root] \
  # Execute the command on the root's passengers
  on passengers \
  # Filter out the data entity from the passengers
  if entity @s[tag=aj.global.data] \
run \
  # Run our select function with the Camera's UUID
  function foo:select with entity @s data.cameras.<camera_name>

      
foo/select.mcfunction
        $execute as $(uuid) run spectate @s @p