Is there a way to set the rotation of an entity relative to another entity?

I want to make it so what ever direction I look a specified entity looks in that direction as well. Is there a way to do that?
Best Answer
No, unfortunately there is not. Now, you could have a backup mob pushing the other mob in that direction that you are looking in, but other than that, no.
Pictures about "Is there a way to set the rotation of an entity relative to another entity?"



How do you rotate an entity in Minecraft?
To change the player's position in the scene, use the movePlayerTo() function. This function takes two arguments: position : Where to move the player, expressed as an object with x, y, and z properties.Unity DOTS - Move and Rotate Entities with the Entity Component System
More answers regarding is there a way to set the rotation of an entity relative to another entity?
Answer 2
You might be able to test for the rotation of the player, and then set the rotation of the entity to that same rotation. Be warned, that will take A LOT of command blocks. You can use CPdirection MCEdit filter and edit it to your needs. Here is the video about the filter:
And here is the filter download: https://www.youtube.com/redirect?q=https%3A%2F%2Fwww.dropbox.com%2Fs%2Fysfaji16z0qf8fn%2FCPDirectionsRexMod.py&redir_token=TNRwyDPPCDnhZzDEQxU1tejVy_t8MTQyNTg0NzY5MEAxNDI1NzYxMjkwSources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Elina Fairytale, Elina Fairytale, George Milton, Elina Fairytale