User Tools

Site Tools


rotate_player_to_direction

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
rotate_player_to_direction [2017/05/08 14:10] – external edit 127.0.0.1rotate_player_to_direction [2021/04/21 18:48] (current) justin
Line 2: Line 2:
 ---- ----
  
-Rotates the player towards the specified cardinal direction. Player movement must first be locked.+Rotates the player to face towards the specified [[cardinal direction]] (i.e. north, south, west, or east).
  
 +====Signature:====
 <code python> <code python>
-rotate_player_to_direction(NORTH)+rotate_player_to_direction(direction)
 </code> </code>
  
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
-|NORTH|Description.|[[String]]|Yes|+|direction|[[Cardinal direction]] for the player to face towards.|[[Cardinal Direction]]|Yes| 
 + 
 +<WRAP center round info 100%> 
 +[[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. 
 +</WRAP>
  
 ====Example:==== ====Example:====
-<code python+<code bauxite
-rotate_player_to_direction(NORTH)+rotate_player_to_direction(SOUTH);
 </code> </code>
-//Results://+//Results:// Rotates the player until they are facing south.
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
-Use the **Rotate Player To Direction** function to ...+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.
 </WRAP> </WRAP>
  
rotate_player_to_direction.1494277828.txt.gz · Last modified: 2017/05/08 14:10 by 127.0.0.1