TransWikia.com

How do I get some other entity to rotate as me?

Arqade Asked by SuninDarknes on May 21, 2021

execute at @p run tp @e[tag=entity] ~ ~ ~ ~ 0 rotates an entity but it teleports it to me.
Is there any way to just rotate an entity to look in the same direction without teleporting them?

One Answer

Assuming you are in the latest version(1.16.5), the following methods should work. For a single entity(excluding players), you could do:

data modify entity <selector with limit=1> Rotation set from entity <selector with limit=1> Rotation

It is very important to add limit=1 in the command. For use with multiple entities(excluding players), do the following.

execute as <selector for the entity you want to rotate> run data modify entity @s Rotation set from entity <selector with limit=1> Rotation

It is important to add limit=1 to the selectors where I said to. For use with players and entities, you need the tp command, you can do the following.

execute as <selector for the entity you want to rotate> at @s rotated as <selector with limit=1> run tp @s ~ ~ ~ ~ ~

Answered by randomuser922 on May 21, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP