======Rotate Player To Direction======
----
Rotates the player to face towards the specified [[cardinal direction]] (i.e. north, south, west, or east).
====Signature:====
rotate_player_to_direction(direction)
^Argument^Description^Type^Required^
|direction|[[Cardinal direction]] for the player to face towards.|[[Cardinal Direction]]|Yes|
[[set_player_movement_locked|Lock/Unlock Player Movement]] must be called before using this function to prevent the player from interfering with the scripted movement.
====Example:====
rotate_player_to_direction(SOUTH);
//Results:// Rotates the player until they are facing south.
Use the **Rotate Player To Direction** function to force the player's viewpoint before an event occurs or to have them facing a specific direction at the end of a cutscene.
----
====Editor Node:====
{{:wiki:rotate_player_to_direction_node.png?nolink|}}
====Visual Demo:====
{{:wiki:rotate_player_to_direction_demo.gif?nolink|}}
~~NOTOC~~