#camera in front

1 messages · Page 1 of 1 (latest)

velvet sinew
#

how to face the camera free to a radius of 3 at the position where the player is facing.

Like this where where even my head is rotating down,the camera is straight angle facing the player and in front:

serene vector
#

change the camera position y coordinate to a static one.

velvet sinew
#

What you mean,i mean how do you do that in command

serene vector
#

location.y = player.location.y + 1

#

assuming location is the location you used for your camera

velvet sinew
#

I meant in /camera command, because i dont know how to set camera in script

serene vector
#

rotated ~ 0

#

execute as @a at @s positioned ~~1~ rotated ~ 0 run camera ... ^^^1 ...

velvet sinew
#

Does it need the 'facing' one after the first coordinate inside /camera

serene vector
#

use facing if you want it to face at a specific location.

velvet sinew
#

So do i type it like this

execute as @s at @s positioned ~~1~ rotated 0 run camera @s set minecraft:free pos ^^^1

?

serene vector
#

rotated ~ 0

#

there are spaces between ~ and 0

velvet sinew
#

Oh so this

#

execute as @s at @s positioned ~~1~ rotated ~ 0 run camera @s set minecraft:free pos ^^^1

serene vector
#

just test it, I don't exactly remember the camera syntax

velvet sinew
#

Let me try,thank youu

serene vector
#

adjust the relative position (...positioned ~~1~) to suit your needs.

#

basically rotated ~ 0 eliminates the player's up/down rotation, and only passes the left/right rotation if you want to know.

velvet sinew
#

it works,the only missing is how to adjust the distance of the camera to the player,because its too close

#
/execute as @s at @s positioned ~~2~ rotated ~ 0 run camera @s set minecraft:free pos ^^^1 facing @p
serene vector
#

adjust the local coordinate (...^^^1)

#

try experimenting

velvet sinew
#

Ohhh the x and z one

#

Alright

#

Thanks again

velvet sinew