Minecraft Wiki
Advertisement

Local coordinates[]

Regarding the recent edits. Local coordinates are unique in that they use a different axes system. These axes are relative to the rotations of an entity. "From the position" and "relative from where the entity is looking" both just apply to the position of the entity, which does not capture the essence of what local coordinates do. --Pepijn (talk) 11:00, 13 December 2017 (UTC)

I've replied on your talk page why I'm disagreeing with you. In short, I'm trying to make a distinction between two different points of origin, namely that of the camera or entity, and that of what the camera/entity is looking at. You're talking about something else. – Jack McKalling [ Jack McKalling's User page Jack McKalling's Talk page Jack McKalling's Contributions ] 12:50, 13 December 2017 (UTC)

Bug?[]

local coordinates seems bugged when using by command block following way:

/execute as @a run setblock ^ ^-1 ^2 dirt

they seem to create blocks around commandblock instead of player. 87.95.249.97 18:32, 18 December 2017 (UTC)

This is not a bug, you must realize that the executor is different than the execution position. The execution position is from where the axes start and is changed by using at in /execute. The executor is which entity is the executor of the command and in the case of local coordinates it determines the rotation the local coordinate axes use, this is set by using as in /execute. Your command only sets the executor, but not the execution position. So it will use the location of the commandblock running it, but the rotation of the players.
What you want is:
/execute as @a at @s run setblock ^ ^-1 ^2 dirt
Also keep in mind that the execution position is set to the feet of entities, an offset ~ ~1.62 ~ will put it at the eyes of players (different entities have a different offset of course). --Pepijn (talk) 18:40, 18 December 2017 (UTC)
Advertisement