Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/camera: Difference between revisions

From SAS Gaming Wiki
imported>BDJP007301
No edit summary
 
SyncBot (talk | contribs)
Remove broken links to missing pages
Line 277: Line 277:
* Fade a random player's camera to white in 2 seconds, last for 1 second, and fade out for 3 seconds:
* Fade a random player's camera to white in 2 seconds, last for 1 second, and fade out for 3 seconds:
:: <code>/camera @r fade time 2 1 3 color 255 255 255</code>
:: <code>/camera @r fade time 2 1 3 color 255 255 255</code>
* Cooperate with the {{cmd|execute}} command, assign "Over Shoulder View" for nearest players (Must be executed in [[Minecraft:repeating command block]]):
* Cooperate with the {{cmd|execute}} command, assign "Over Shoulder View" for nearest players (Must be executed in repeating command block):
:: <code>/execute as @p at @s run camera @s set minecraft:free ease 0.25 in_out_quad pos ^-2 ^2 ^-4 facing ^ ^ ^5</code>
:: <code>/execute as @p at @s run camera @s set minecraft:free ease 0.25 in_out_quad pos ^-2 ^2 ^-4 facing ^ ^ ^5</code>


Line 284: Line 284:
|{{HistoryLine|bedrock}}
|{{HistoryLine|bedrock}}
|{{HistoryLine||?|dev=?|Added {{cmd|camera|link=none}} as a developer command.}}
|{{HistoryLine||?|dev=?|Added {{cmd|camera|link=none}} as a developer command.}}
|{{HistoryLine||1.20.0|exp=Experimental Cameras|dev=Preview 1.20.0.22|{{cmd|camera|link=none}} is now behind the "Experimental Cameras" [[Minecraft:experimental]] toggle.}}
|{{HistoryLine||1.20.0|exp=Experimental Cameras|dev=Preview 1.20.0.22|{{cmd|camera|link=none}} is now behind the "Experimental Cameras" experimental toggle.}}
|{{HistoryLine||1.20.10|exp=Experimental Cameras|dev=Preview 1.20.10.20|Added <code>example:example_player_listener</code> camera preset.
|{{HistoryLine||1.20.10|exp=Experimental Cameras|dev=Preview 1.20.10.20|Added <code>example:example_player_listener</code> camera preset.
|The color fade values are now integers between 0 and 255 instead of 0.0 to 1.0.
|The color fade values are now integers between 0 and 255 instead of 0.0 to 1.0.
Line 290: Line 290:
|{{HistoryLine|||dev=Preview 1.20.10.23|Added <code>facing</code> option.
|{{HistoryLine|||dev=Preview 1.20.10.23|Added <code>facing</code> option.
|Added <code>example:example_player_effects</code> camera preset.}}
|Added <code>example:example_player_effects</code> camera preset.}}
|{{HistoryLine||1.20.30|dev=Preview 1.20.20.22|{{cmd|camera|link=none}} is now available without using the "Experimental Cameras" [[Minecraft:experimental]] toggle.
|{{HistoryLine||1.20.30|dev=Preview 1.20.20.22|{{cmd|camera|link=none}} is now available without using the "Experimental Cameras" experimental toggle.
|Removed <code>example:example_free</code>, <code>example:example_player_effects</code>, and <code>example:example_player_listener</code> camera presets.}}
|Removed <code>example:example_free</code>, <code>example:example_player_effects</code>, and <code>example:example_player_listener</code> camera presets.}}
|{{HistoryLine||1.21.20|exp=Creator Cameras: New Third-Person Presets|dev=Preview 1.21.10.20|Added <code>view_offset</code> option.
|{{HistoryLine||1.21.20|exp=Creator Cameras: New Third-Person Presets|dev=Preview 1.21.10.20|Added <code>view_offset</code> option.
Line 296: Line 296:
|{{HistoryLine||1.21.20|exp=Creator Cameras: Focus Target Camera|dev=Preview 1.21.20.22|Added {{cd|d=and|remove_target|target_center_offset|target_entity}} option.}}
|{{HistoryLine||1.21.20|exp=Creator Cameras: Focus Target Camera|dev=Preview 1.21.20.22|Added {{cd|d=and|remove_target|target_center_offset|target_entity}} option.}}
|{{HistoryLine||1.21.40|exp=Creator Cameras: New Third-Person Presets|dev=Preview 1.21.40.20|Added {{cd|entity_offset}} option.}}
|{{HistoryLine||1.21.40|exp=Creator Cameras: New Third-Person Presets|dev=Preview 1.21.40.20|Added {{cd|entity_offset}} option.}}
|{{HistoryLine||1.21.40|dev=Preview 1.21.40.22|{{cd|entity_offset}} and {{cd|view_offset}} option and <code>minecraft:follow_orbit</code> camera preset are now available without using the "Creator Cameras: New Third-Person Presets" [[Minecraft:experimental]] toggle.}}
|{{HistoryLine||1.21.40|dev=Preview 1.21.40.22|{{cd|entity_offset}} and {{cd|view_offset}} option and <code>minecraft:follow_orbit</code> camera preset are now available without using the "Creator Cameras: New Third-Person Presets" experimental toggle.}}
|{{HistoryLine||1.21.50|exp=Creator Cameras: New Third Person Presets|dev=Preview 1.21.50.20|Added <code>minecraft:fixed_boom</code> camera preset.}}
|{{HistoryLine||1.21.50|exp=Creator Cameras: New Third Person Presets|dev=Preview 1.21.50.20|Added <code>minecraft:fixed_boom</code> camera preset.}}
|{{HistoryLine||1.21.50|dev=Release|{{cd|view_offset}} option is now available without using the "Creator Cameras: New Third-Person Presets" [[Minecraft:experimental]] toggle.}}
|{{HistoryLine||1.21.50|dev=Release|{{cd|view_offset}} option is now available without using the "Creator Cameras: New Third-Person Presets" experimental toggle.}}
|{{HistoryLine||1.21.60|dev=Preview 1.21.60.25|The changes in 1.21.20.22 is now available without using the "Creator Cameras: Focus Target Camera" [[Minecraft:experimental]] toggle.}}
|{{HistoryLine||1.21.60|dev=Preview 1.21.60.25|The changes in 1.21.20.22 is now available without using the "Creator Cameras: Focus Target Camera" experimental toggle.}}
|{{HistoryLine||1.21.70|dev=Preview 1.21.70.24|{{cd|minecraft:fixed_boom}} camera preset is now available without using the "Creator Cameras: New Third Person Presets" [[Minecraft:experimental]] toggle.}}
|{{HistoryLine||1.21.70|dev=Preview 1.21.70.24|{{cd|minecraft:fixed_boom}} camera preset is now available without using the "Creator Cameras: New Third Person Presets" experimental toggle.}}
|{{HistoryLine||1.21.80|dev=Preview 1.21.80.25|exp=Experimental Creator Camera Features|Added {{cd|minecraft:control_scheme_camera}} camera preset.}}
|{{HistoryLine||1.21.80|dev=Preview 1.21.80.25|exp=Experimental Creator Camera Features|Added {{cd|minecraft:control_scheme_camera}} camera preset.}}
|{{HistoryLine||1.21.100|dev=Preview 1.21.100.20|exp=Experimental Creator Camera Features|Added {{cd|fov_clear}} and {{cd|fov_set}} option, Used to Control the camera FOV.}}
|{{HistoryLine||1.21.100|dev=Preview 1.21.100.20|exp=Experimental Creator Camera Features|Added {{cd|fov_clear}} and {{cd|fov_set}} option, Used to Control the camera FOV.}}
Line 315: Line 315:
{{Navbox commands}}
{{Navbox commands}}


[[Minecraft:de:Befehl/camera]]
de:Befehl/camera
[[Minecraft:ja:コマンド/camera]]
ja:コマンド/camera
[[Minecraft:pt:Comandos/camera]]
pt:Comandos/camera
[[Minecraft:zh:命令/camera]]
zh:命令/camera

Revision as of 15:43, 9 April 2026

Template:Distinguish Template:Exclusive Template:Infobox command

Modifies player's camera view.

Syntax

/camera <players: target> ...
  • ... attach_to_entity <entity: target>
  • ... clear
  • ... detach_from_entity
  • ... fade ...
    • ... color <red: int> <green: int> <blue: int>
    • ... time <fadeInSeconds: float> <holdSeconds: float> <fadeOutSeconds: float> ...
      • ... [color <red: int> <green: int> <blue: int>]
  • ... fov_clear [fovEaseTime: float] [fovEaseType: Easing]
  • ... fov_set <fov_value: float> [fovEaseTime: float] [fovEaseType: Easing]
  • ... play_spline <name: string>
  • ... 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

Arguments

Template:Info needed section

Template:Argument

Specifies the player that the camera will be modified.
Template:Arg desc

Template:Argument

Specifies the entity to which the camera will be attached.
Template:Arg desc

Template:Argument, Template:Argument, and Template:Argument

Specifies the camera RGB color.
Template:Arg desc And must be between 0 and 255 (inclusive).

Template:Argument, Template:Argument, and Template:Argument

Specifies the camera fade in, hold, and fade out duration, the unit is seconds.
Template:Arg desc And must be between 0.0 and 10.0 (inslusive).

Template:Argument

Specifies the camera FOV.
Template:Arg desc Due to game restrictions, the actual valid values range is between 30 and 110 (inslusive).

Template:Argument

Specifies the duration of the camera FOV smooth transition (seconds), the default is 0.
Template:Arg desc

Template:Argument

Specifies an easing function/type to use for the camera FOV, the default is Template:Cd.
Must be one of Template:Cd.

Template:Argument

Specifies the spline ID. Only valid when using Template:Cd preset.
Template:Arg desc

Template:Argument

Template:Info needed
A camera view/preset.
Must be one of the following:
  • minecraft:control_scheme_camera — Control scheme camera.Template:OnlyExperimental
  • minecraft:first_person — First Person View.
  • minecraft:fixed_boom — Fixed boom view's orbit camera.
  • minecraft:follow_orbit — Orbit camera.
  • minecraft:free — Free View.
  • minecraft:third_person — Third Person View Back.
  • minecraft:third_person_front — Third Person View Front.

Template:Argument

Specifies the duration of the camera smooth transition (seconds). Only valid when using Template:Cd preset.
Template:Arg desc

Template:Argument

Specifies an easing function/type to use for the camera. Only valid when using Template:Cd preset.
Must be one of Template:Cd.

Template:Argument

Specifies change the position and facing of free view to the default value (camera position (0,0,0), rotation xRot=0, yRot=0) Template:Info needed. Only valid when using minecraft:free preset.
Must be default.

Template:Argument

Specifies the entity to make the camera facing to. Only valid when using minecraft:free preset.
Template:Arg desc

Template:Argument

Specifies the coordinates to make the camera facing to. Only valid when using minecraft:free preset.
Template:Arg desc

Template:Argument

Specifies the camera position. Only valid when using minecraft:free preset.
Template:Arg desc

Template:Argument

Specifies the camera vertical rotation. Under using minecraft:follow_orbit preset, will also modified the player's facing.
Template:Arg desc And must be between -90 and 0 (inslusive).

Template:Argument

Specifies the camera horizontal rotation. Under using minecraft:follow_orbit preset, will also modified the player's facing.
Template:Arg desc

Template:Argument and Template:Argument

Specifies the offset of the camera. Only valid when using minecraft:follow_orbit preset.
Template:Arg desc And must be between -64 and 64 (inslusive).

Template:Argument, Template:Argument, and Template:Argument

Specifies the offset of the camera from an entity. Only valid when using minecraft:follow_orbit preset.
Template:Arg desc And must be between -64 and 64 (inslusive).

Template:Argument

Specifies the entity to focus the camera on. Only valid when using minecraft:free preset.
Template:Arg desc

Template:Argument, Template:Argument, and Template:Argument

Specifies the offset of the camera from the center of a focused/targeted entity. Only valid when using minecraft:free preset.
Template:Arg desc

Result

Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table

Output

Template:Output table Template:Output table Template:Output table Template:Output table

Examples

Template:Info needed section

File:Over Shoulder Camera.jpg
"Over Shoulder View" implemented by Template:Cmd
  • Set yourself to last for 5 seconds, The easing mode is in_out_circ, Rotate minecraft: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 effects:
/camera @a clear
  • Fade a random player's camera to white in 2 seconds, last for 1 second, and fade out for 3 seconds:
/camera @r fade time 2 1 3 color 255 255 255
  • Cooperate with the Template:Cmd command, assign "Over Shoulder View" for nearest players (Must 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

Template:HistoryTable

External links

Navigation

Template:Navbox commands

de:Befehl/camera ja:コマンド/camera pt:Comandos/camera zh:命令/camera