mojira.dev
MCPE-223452

Script "faceLocation" event properties are calculated incorrectly

According to the documentation of the faceLocation property, the returned vector should always be relative to the bottom north-west corner of the block unit. However, this is currently false for the majority of positions a block can be placed in.

Observed results:

  • faceLocation appears to be the fractional part of the world-relative location of the hit/interaction.

  • For example, this means that a world-relative X value of -22.45 is incorrectly converted to 0.45 by removing what is before the decimal point.

    • As a result, the value has been measured from the east instead of the west.

  • This also results in faceLocation values that should be 1 (such as the Y value when interacting with the top of a block) being returned as 0.

Expected results:

  • faceLocation should be calculated by subtracting the block location from the world-relative location of the event.

  • For example, the X coordinate of the block (-23) should be subtracted from -22.45 to get the correct faceLocation.x value of 0.55.

Comments 1

Hi!
For this moment the ticket has been closed as Awaiting Response.

  • Can you provide a detailed reproduction steps and media for this issue?

The ticket will automatically reopen once you reply. Thank you!

QuazChick

(Unassigned)

Confirmed

Multiple

1.21.100.23 Preview, 1.21.100.22 Preview, 1.21.92 Hotfix, 1.21.100.21 Preview, 1.21.93 Hotfix

Retrieved