Take Camera: Difference between revisions
No edit summary |
(Marked this version for translation) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
<!--T:1--> | <!--T:1--> | ||
[[Category:Agents]] | [[Category:Agents]] | ||
<section begin=image/>[[File:Take Camera.png|alt=take camera block|thumb]]<section end=image/> | <section begin=image/>[[File:Take Camera.png|alt=take camera block|thumb]]<section end=image/><p id="tooltip">Enables perspective of over-agent’s-shoulder view; i.e., the camera follows the agent around.</p> | ||
{{#vardefine:take camera|<code>take camera</code>}} | |||
<section begin=name/>'''<code>take camera</code>'''<section end=name/> is a [[code block]] part of the [[agents]] drawer. | <!--T:9--> | ||
{{#vardefine:take camera|<code>take camera</code>}}<section begin=name/>'''<code>take camera</code>'''<section end=name/> is a [[code block]] part of the [[agents]] drawer. | |||
==Usage== <!--T:8--> | ==Usage== <!--T:8--> | ||
<!--T:2--> | <!--T:2--> | ||
<code>take camera</code> changes the camera perspective to be from the point of view of the agent executing the code. | |||
<!--T:3--> | <!--T:3--> | ||
{{#var:take camera}} can be useful for implementing interactive games from the first-person perspective. | {{#var:take camera}} can be useful for implementing interactive games from the first-person perspective. | ||
<!--T:4--> | <!--T:4--> | ||
==Syntax== | |||
<code>(in reference to the agent itself) take camera</code> | <code>(in reference to the agent itself) take camera</code> | ||
==Example== <!--T:10--> | |||
<!--T:11--> | |||
[[File:take_camera_example.gif|alt=Take Camera example gif|thumb]] | |||
[[File:take_camera_example.png|alt=Take Camera example code|thumb]] | |||
<!--T:12--> | |||
When the ‘change view’ button is pushed, the camera angle to over the shoulder of the elephant agent. Note that if there were multiple elephants, a single elephant would take the camera. | |||
==Related Blocks== <!--T:5--> | ==Related Blocks== <!--T:5--> |
Latest revision as of 18:18, 11 August 2023
Enables perspective of over-agent’s-shoulder view; i.e., the camera follows the agent around.
take camera
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
(in reference to the agent itself) take camera
Example
When the ‘change view’ button is pushed, the camera angle to over the shoulder of the elephant agent. Note that if there were multiple elephants, a single elephant would take the camera.