Face Towards

From StarLogo Nova Wiki
Revision as of 18:34, 16 August 2023 by FuzzyBot (talk | contribs) (Updating to match new version of source page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Other languages:
The Face Towards Block

Usage

Turns to face the agent specified.

Syntax

Inputs in this block:

  1. a block which specifies another agent in The World

Example

Face Towards example gif
Face Towards example code

The elephants face toward the nearest patch of grass within their sensing radius and walk towards it. This behavior is enabled by the nearest block, which identifies the closest agent of a specified breed. This may model a hungry elephant more accurately than a basic wiggle walk since elephants likely walk towards food.