/camera
/camera
Permission level required |
1 |
---|---|
Restrictions |
Cheat only |
{ "title": "<code>/camera</code>", "rows": [ { "field": "1", "label": "(link to Permission level article, displayed as Permission level<br>required)" }, { "field": "(link to Option article, displayed as Cheat) only<br>", "label": "(link to Commands#Restrictions article, displayed as Restrictions)" } ], "invimages": [], "images": [] }
Modifies player's camera view.
Syntax[edit | edit source]
/camera <players: target> ...
... clear
... fade ...
... color <red: int> <green: int> <blue: int>
... time <fadeInSeconds: float> <holdSeconds: float> <fadeOutSeconds: float> ...
... color <red: int> <green: int> <blue: int>
... remove_target
... set <preset: string> ...
... [default: default]
... ease <easeTime: float> <easeType: Easing> ...
... [default: default]
... facing ...
... <lookAtEntity: target>
... <lookAtPosition: x y z>
... pos <position: x y z> ...
... facing ...
... <lookAtEntity: target>
... <lookAtPosition: x y z>
... rot <xRot: value> <yRot: value>
... rot <xRot: value> <yRot: value>
... entity_offset <xEntityOffset: float> <yEntityOffset: float> <zEntityOffset: float>
... facing ...
... <lookAtEntity: target>
... <lookAtPosition: x y z>
... pos <position: x y z> ...
... facing ...
... <lookAtEntity: target>
... <lookAtPosition: x y z>
... rot <xRot: value> <yRot: value>
... rot <xRot: value> <yRot: value> ...
... entity_offset <xEntityOffset: float> <yEntityOffset: float> <zEntityOffset: float>
... view_offset <xViewOffset: float> <yViewOffset: float> ...
... entity_offset <xEntityOffset: float> <yEntityOffset: float> <zEntityOffset: float>
... view_offset <xViewOffset: float> <yViewOffset: float> ...
... entity_offset <xEntityOffset: float> <yEntityOffset: float> <zEntityOffset: float>
... target_entity <entity: target> ...
... target_center_offset <xTargetCenterOffset: float> <yTargetCenterOffset: float> <zTargetCenterOffset: float>
- Syntax displayed in various ways
Simplified tree: [show] camera <players: target> ...
... clear
... fade ...
... color <red: int> <green: int> <blue: int>
... time <fadeInSeconds: float> <holdSeconds: float> <fadeOutSeconds: float> [color <red: int> <green: int> <blue: int>]
... remove_target
... set <preset: string> ...
... [default: default]
... ease <easeTime: float> <easeType: Easing> ...
... [default: default]
... facing <lookAtEntity: target>
... facing <lookAtPosition: x y z>
... pos <position: x y z> ...
... facing <lookAtEntity: target>
... facing <lookAtPosition: x y z>
... rot <xRot: value> <yRot: value>
... rot <xRot: value> <yRot: value>
... entity_offset <xEntityOffset: float> <yEntityOffset: float> <zEntityOffset: float>
... facing <lookAtEntity: target>
... facing <lookAtPosition: x y z>
... pos <position: x y z> ...
... facing <lookAtEntity: target>
... facing <lookAtPosition: x y z>
... rot <xRot: value> <yRot: value>
... rot <xRot: value> <yRot: value> [view_offset <xViewOffset: float> <yViewOffset: float>] ...
... entity_offset <xEntityOffset: float> <yEntityOffset: float> <zEntityOffset: float>
... view_offset <xViewOffset: float> <yViewOffset: float> [entity_offset <xEntityOffset: float> <yEntityOffset: float> <zEntityOffset: float>]
... target_entity <entity: target> [target_center_offset <xTargetCenterOffset: float> <yTargetCenterOffset: float> <zTargetCenterOffset: float>]
Minimised tree: [show] camera <players: target> ...
... clear
... fade [color <red: int> <green: int> <blue: int>|time <fadeInSeconds: float> <holdSeconds: float> <fadeOutSeconds: float> [color <red: int> <green: int> <blue: int>]]
... remove_target
... set <preset: string> ...
... [default: default]
... ease <easeTime: float> <easeType: Easing> ...
... [default: default]
... facing <<lookAtEntity: target>|<lookAtPosition: x y z>>
... pos <position: x y z> [facing <<lookAtEntity: target>|<lookAtPosition: x y z>>|rot <xRot: value> <yRot: value>]
... rot <xRot: value> <yRot: value>
... entity_offset <xEntityOffset: float> <yEntityOffset: float> <zEntityOffset: float>
... facing <<lookAtEntity: target>|<lookAtPosition: x y z>>
... pos <position: x y z> [facing <<lookAtEntity: target>|<lookAtPosition: x y z>>|rot <xRot: value> <yRot: value>]
... rot <xRot: value> <yRot: value> [view_offset <xViewOffset: float> <yViewOffset: float>] ...
... entity_offset <xEntityOffset: float> <yEntityOffset: float> <zEntityOffset: float>
... view_offset <xViewOffset: float> <yViewOffset: float> ...
... entity_offset <xEntityOffset: float> <yEntityOffset: float> <zEntityOffset: float>
... target_entity <entity: target> [target_center_offset <xTargetCenterOffset: float> <yTargetCenterOffset: float> <zTargetCenterOffset: float>]
Maximised: [show] camera <players: target> clear
camera <players: target> fade
camera <players: target> fade color <red: int> <green: int> <blue: int>
camera <players: target> fade time <fadeInSeconds: float> <holdSeconds: float> <fadeOutSeconds: float>
camera <players: target> fade time <fadeInSeconds: float> <holdSeconds: float> <fadeOutSeconds: float> color <red: int> <green: int> <blue: int>
camera <players: target> remove_target
camera <players: target> set <preset: string> [default: default]
camera <players: target> set <preset: string> ease <easeTime: float> <easeType: Easing> [default: default]
camera <players: target> set <preset: string> ease <easeTime: float> <easeType: Easing> facing <lookAtEntity: target>
camera <players: target> set <preset: string> ease <easeTime: float> <easeType: Easing> facing <lookAtPosition: x y z>
camera <players: target> set <preset: string> ease <easeTime: float> <easeType: Easing> pos <position: x y z>
camera <players: target> set <preset: string> ease <easeTime: float> <easeType: Easing> pos <position: x y z> facing <lookAtEntity: target>
camera <players: target> set <preset: string> ease <easeTime: float> <easeType: Easing> pos <position: x y z> facing <lookAtPosition: x y z>
camera <players: target> set <preset: string> ease <easeTime: float> <easeType: Easing> pos <position: x y z> rot <xRot: value> <yRot: value>
camera <players: target> set <preset: string> ease <easeTime: float> <easeType: Easing> rot <xRot: value> <yRot: value>
camera <players: target> set <preset: string> entity_offset <xEntityOffset: float> <yEntityOffset: float> <zEntityOffset: float>
camera <players: target> set <preset: string> facing <lookAtEntity: target>
camera <players: target> set <preset: string> facing <lookAtPosition: x y z>
camera <players: target> set <preset: string> pos <position: x y z>
camera <players: target> set <preset: string> pos <position: x y z> facing <lookAtEntity: target>
camera <players: target> set <preset: string> pos <position: x y z> facing <lookAtPosition: x y z>
camera <players: target> set <preset: string> pos <position: x y z> rot <xRot: value> <yRot: value>
camera <players: target> set <preset: string> rot <xRot: value> <yRot: value>
camera <players: target> set <preset: string> rot <xRot: value> <yRot: value> entity_offset <xEntityOffset: float> <yEntityOffset: float> <zEntityOffset: float>
camera <players: target> set <preset: string> rot <xRot: value> <yRot: value> view_offset <xViewOffset: float> <yViewOffset: float>
camera <players: target> set <preset: string> rot <xRot: value> <yRot: value> view_offset <xViewOffset: float> <yViewOffset: float> entity_offset <xEntityOffset: float> <yEntityOffset: float> <zEntityOffset: float>
camera <players: target> set <preset: string> view_offset <xViewOffset: float> <yViewOffset: float>
camera <players: target> set <preset: string> view_offset <xViewOffset: float> <yViewOffset: float> entity_offset <xEntityOffset: float> <yEntityOffset: float> <zEntityOffset: float>
camera <players: target> target_entity <entity: target>
camera <players: target> target_entity <entity: target> target_center_offset <xTargetCenterOffset: float> <yTargetCenterOffset: float> <zTargetCenterOffset: float>
Arguments[edit | edit source]
players: target
: CommandSelector<Player>
- Specifies the player that the camera will be modified.
- Must be a player name or a target selector.
red: int
: int, green: int
: int, and blue: int
: int
- Specifies the camera RGB color.
- Must be a [Int]32-bit integer number (from -2147483648 (-231) to 2147483647 (231-1) ). And must be between 0 and 255.
fadeInSeconds: float
: float, holdSeconds: float
: float, and fadeOutSeconds: float
: float
- Specifies the camera fade in, hold, and fade out duration.
- Must be a [Float]Single-precision floating-point number (from -(2-2-23)×2127 (≈-3.4×1038) to (2-2-23)2×127 (≈3.4×1038) ). And must be between 0.0 and 10.0 (seconds).
preset: string
: basic_string
- [more information needed]
- A camera view/preset.
- Must be one of the following:
minecraft:free
— Free View.minecraft:first_person
— First Person View.minecraft:third_person
— Third Person View Back.minecraft:third_person_front
— Third Person View Front.minecraft:follow_orbit
— Surround around the target entity or coordinates.minecraft:fixed_boom
— Fixed boom view.
easeTime: float
: float
- Specifies the duration of the camera smooth transition.
- Must be a [Float]Single-precision floating-point number (from -(2-2-23)×2127 (≈-3.4×1038) to (2-2-23)2×127 (≈3.4×1038) ).
easeType: Easing
: enum
- Specifies an easing function/type to use for the camera.
- Must be one of
linear
,spring
,in_quad
,out_quad
,in_out_quad
,in_cubic
,out_cubic
,in_out_cubic
,in_quart
,out_quart
,in_out_quart
,in_quint
,out_quint
,in_out_quint
,in_sine
,out_sine
,in_out_sine
,in_expo
,out_expo
,in_out_expo
,in_circ
,out_circ
,in_out_circ
,in_bounce
,out_bounce
,in_out_bounce
,in_back
,out_back
,in_out_back
,in_elastic
,out_elastic
, andin_out_elastic
.
default: default
: basic_string
- [more information needed]
- Must be a string. And it must be a single word that has no space or a double-quoted string (When quoted,
\
can be used to escape characters).
lookAtEntity: target
: CommandSelector<Actor>
- Specifies the entity to make the camera facing to.
- Must be a player name or a target selector.
lookAtPosition: x y z
: CommandPositionFloat
- Specifies the coordinates to make the camera facing to.
- Must be three-dimensional coordinates with single-precision floating-point number elements. Accepts tilde and caret notations.
position: x y z
: CommandPosition
- Specifies the camera position.
- Must be a three-dimensional coordinates composed of
<X>
,<Y>
and<Z>
, each of which must be a single-precision floating-point number or tilde and caret notation.
xRot: value
: RelativeFloat and yRot: value
: RelativeFloat
- Specifies the camera rotation.
- Must be a [Float] float. Accepts tilde notation.
xViewOffset: float
: RelativeFloat and yViewOffset: float
: RelativeFloat
- Specifies the offset of the camera.
- Must be a [Float] float. Accepts tilde notation.
xEntityOffset: float
: RelativeFloat, yEntityOffset: float
: RelativeFloat and zEntityOffset: float
: RelativeFloat
- Specifies the offset of the camera from an entity.
- Must be a [Float] float. Accepts tilde notation.
entity: target
: CommandSelector<Actor>
- Specifies the entity to focus the camera on.
- Must be a player name or a target selector.
xTargetCenterOffset: float
: RelativeFloat, yTargetCenterOffset: float
: RelativeFloat, and zTargetCenterOffset: float
: RelativeFloat
- Specifies the offset of the camera from the center of a focused/targeted entity.
- Must be a [Float] float. Accepts tilde notation.
Result[edit | edit source]
Command | Trigger | Bedrock Edition |
---|---|---|
Any | the arguments are not specified correctly | Unparseable |
players: target fails to resolve to one or more online players | Failed | |
/camera ... facing ... | lookAtEntity: target fails to resolve to an entity (named player must be online) | |
Any | Otherwise | Successful |
Output[edit | edit source]
Command | Edition | Situation | Success Count |
---|---|---|---|
Any | Bedrock Edition | On fail | 0 |
On success | The number of players who are selected |
Examples[edit | edit source]

/camera
- Set yourself to last for 5 seconds, The easing mode is
in_out_circ
, Rotateminecraft:free
(Free View) camera view 90 degrees around the X-axis in 5 grids above the current position:
/camera @s set minecraft:free ease 5 in_out_circ pos ~ ~5 ~ rot 90 0
- Clear All players' camera effect:
/camera @a clear
- Set the camera of 2 seconds fade in, last for 1 second, fade out 3 seconds, and color pure white for random players:
/camera @r fade time 2 1 3 color 255 255 255
- Cooperate with the
/execute
command, Assign "Over Shoulder View" for nearest players (Need to be executed in repeating command block):
/execute as @p at @s run camera @s set minecraft:free ease 0.25 in_out_quad pos ^-2 ^2 ^-4 facing ^ ^ ^5
History[edit | edit source]
[hide]Bedrock Edition | |||||||
---|---|---|---|---|---|---|---|
? | ? | Added /camera as a developer command. | |||||
1.20.0 Experiment | Preview 1.20.0.22 | /camera is now behind the "Experimental Cameras" experimental toggle. | |||||
1.20.10 Experiment | Preview 1.20.10.20 | Added example:example_player_listener camera preset.
| |||||
The color fade values are now integers between 0 and 255 instead of 0.0 to 1.0. | |||||||
The camera fade in, hold, and fade out duration must be between 0.0 and 10.0 seconds. | |||||||
Preview 1.20.10.23 | Added facing option.
| ||||||
Added example:example_player_effects camera preset. | |||||||
1.20.30 | Preview 1.20.20.22 | /camera is now available without using the "Experimental Cameras" experimental toggle.
| |||||
Removed example:example_free , example:example_player_effects , and example:example_player_listener camera presets. | |||||||
1.21.20 Experiment | Preview 1.21.10.20 | Added view_offset option behind the "Creator Cameras: New Third-Person Presets" experimental toggle.
| |||||
Added minecraft:follow_orbit camera preset behind the "Creator Cameras: New Third-Person Presets" experimental toggle. | |||||||
1.21.20 Experiment | Preview 1.21.20.23 | Added new subcommands for /camera behind the "Creator Cameras: Focus Target Camera" experimental toggle. | |||||
1.21.40 Experiment | Preview 1.21.40.20 | Added the entity_offset parameter to the command behind the "Creator Cameras: New Third-Person Presets" experimental toggle. | |||||
1.21.40 | Preview 1.21.40.22 | entity_offset parameter and minecraft:follow_orbit camera preset are now available without using the "Creator Cameras: New Third-Person Presets" experimental toggle. | |||||
1.21.50 Experiment | Preview 1.21.50.20 | Added minecraft:fixed_boom camera preset behind the "Creator Cameras: New Third Person Presets" experimental toggle. | |||||
1.21.50 | Release | view_offset parameter is now available without using the "Creator Cameras: New Third-Person Presets" experimental toggle. | |||||
1.21.60 | Preview 1.21.60.25 | The changes in 1.21.20.23 is now available without using the "Creator Cameras: Focus Target Camera" experimental toggle. |