======Rotate Entity Towards======
----
Rotates an [[entity]] to face towards another [[entity]] over the specified duration (in seconds). The target [[entity]] can optionally be rotated to face towards the first [[entity]] simultaneously.
====Signature:====
rotate_entity_towards(entity, target_entity, also_rotate_target, duration)
^Argument^Description^Type^Required^
|entity|[[Entity]] to rotate.|[[Entity]]|Yes|
|target_entity|Target [[entity]] to rotate the first [[entity]] towards.|[[Entity]]|Yes|
|also_rotate_target|Determines if the target [[entity]] should also be rotated towards the first [[entity]].|[[Boolean]]|Yes|
|duration|Duration of the rotation (in seconds).|[[Number]]|Yes|
====Example:====
rotate_entity_towards(player, entity["purple_slime"], true, 1);
//Results:// The [[player character]] is rotated to face towards the [[entity]] with an ID of "purple_slime" over a duration of one second. The purple slime is also simultaneously rotated to face towards the [[player character]].
Use the **Rotate Entity Towards** function to have [[character|characters]] look at each other during a cutscene or to have them look towards an [[object]] that is the focus of a conversation.
----
====Editor Node:====
{{:wiki:rotate_entity_towards_node.png?nolink|}}
====Visual Demo:====
{{:wiki:rotate_entity_towards_demo.gif?nolink|}}
~~NOTOC~~