Face Towards/es: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
<p id="tooltip">Turns to face another agent.</ | <section begin="image"/>[[File:face_towards.png|alt=The Face Towards Block|thumb]]<section end="image"/> | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
==Usage== | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
<p id="tooltip">Turns to face the agent specified.</p> | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
==Syntax== | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
Inputs in this block: | |||
#a block which specifies another agent in The World | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
==Example== | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
[[File:nearest_within_steps_example.gif|alt=Face Towards example gif|thumb]] | |||
[[File:face_towards_example.png|alt=Face Towards example code|thumb]] | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
The elephants face toward the nearest patch of grass within their sensing radius and walk towards it. This behavior is enabled by the [[Special:MyLanguage/Nearest Within Steps|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. | |||
</div> | </div> | ||
[[Category:Movimiento]] | [[Category:Movimiento]] | ||
[[Category:Code Block]] | [[Category:Code Block]] |
Latest revision as of 18:37, 16 August 2023
Usage
Turns to face the agent specified.
Syntax
Inputs in this block:
- a block which specifies another agent in The World
Example
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.