Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 897 Bytes

File metadata and controls

31 lines (24 loc) · 897 Bytes
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

:::admonition type=info title=Example

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>
$execute as $(uuid) run spectate @s @p

:::