tp doesn't transfer the vertical rotation of the victim to the target
Partner Rank: 3
Partner Team Reporting: Shapescape
Verification builds: 1.17.40, 1.18.10.28
Summary:
Teleporting an entity to another using /tp does not transfer the vertical rotation to that of the target entity. This causes one of our current raycasting solutions to stop functioning.
The results are as expected if the min_engine_version of the Behavior Pack is set to [1, 16, 0], and versions higher than that stop the entity from inheriting correct vertical rotation (horizontal rotation gets assigned correctly).
Note that the entity must have had a runtime_identifier of "minecraft:armor_stand" for it to work as expected with the min_engine_version set to [1, 16, 0]. If that wasn't the case, the entity would not rotate correctly at all. And with a higher min_engine_version (1,17 or 1,18), the horizontal rotation would apply correctly without the specific runtime_identifier, but the vertical one won't be assigned.
Other solutions don't offer the same qualities. Implementing raycasting this way is one of the main uses of local coordinates (^ ^ ^) too.
Impact: We are locked out of this way of implementing raycasting, unless we opt for min_engine_version of 1,16,0 which does not seem like the best practice.
Repro Steps:
- Make sure the min_engine_version in the BP manifest.json of the provided world is set to [1, 18, 0].
- Enter the provided world in 1.18.10.28
- Look more than 10 degrees down and run /function ray_init
- Notice the rays only ever shoot our horizontally, and the debug /say commands list the entity as perfectly horizontal (rx=0,rxm=0)
- Exit the game completely (just rejoining world does not let min_engine_version update)
- Change the min_engine_version in the BP manifest.json of the provided world to [1, 16, 0]
- Enter the provided world in 1.18.10.28
- Look more than 10 degrees down and run /function ray_init
- Notice the rays shooting in the direction that the player is looking
Observed Results:
The vertical rotation of the entity after being teleported to the player is not set, not even during the same tick that the command runs, if the min_engine_version of the Behavior Pack is set to [1, 17, 0]or [1, 18, 0]
Expected Results:
The vertical rotation of the victim entity is set to that of the target entity when teleporting when using a recent min_engine_version number.
Screenshots/Videos attached: Yes
Regression Builds: 1.16, higher versions required a [1, 16, 0] min_engine_version setting
Notes: The cause for this bug might be related to the fix implemented for this issue, though that's only speculation: MCPE-35979