Skip to main content

Take Camera

Enables perspective of over-agent's-shoulder view; i.e., the camera follows the agent around.

Take Camera block

Description

The Take Camera block enables an over-the-shoulder view from the perspective of the agent executing the code. The camera will follow the agent around as it moves. This is a code block part of the agents drawer.

Usage

Take Camera changes the camera perspective to be from the point of view of the agent executing the code.

Take Camera can be useful for implementing interactive games from the first-person perspective.

Syntax

This block has no inputs.

(in reference to the agent itself) take camera

Example

When the 'change view' button is pushed, the camera angle changes to over the shoulder of the elephant agent. Note that if there were multiple elephants, a single elephant would take the camera.

Take Camera example code

Notes

This block is particularly useful for creating immersive experiences and games where the player controls a specific agent from a first-person or over-the-shoulder perspective.

Currently no directly related blocks for camera control.