User Tools

Site Tools


rotate_entity_towards

Differences

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

Link to this comparison view

Next revision
Previous revision
rotate_entity_towards [2017/05/08 14:10] – external edit 127.0.0.1rotate_entity_towards [2021/04/21 18:48] (current) justin
Line 2: Line 2:
 ---- ----
  
-Rotates an entity to face towards another over the specified duration (in seconds). The target entity can optionally be rotated simultaneously to face towards the first entity.+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:====
 <code python> <code python>
-rotate_entity_towards(player, entity["character_id"]false1)+rotate_entity_towards(entity, target_entity, also_rotate_targetduration)
 </code> </code>
  
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
-|player|Description.|[[String]]|Yes| +|entity|[[Entity]] to rotate.|[[Entity]]|Yes| 
-| entity["character_id"]|Description.|[[String]]|Yes| +|target_entity|Target [[entity]] to rotate the first [[entity]] towards.|[[Entity]]|Yes| 
-false|Description.|[[String]]|Yes| +|also_rotate_target|Determines if the target [[entity]] should also be rotated towards the first [[entity]].|[[Boolean]]|Yes| 
-1|Description.|[[String]]|Yes|+|duration|Duration of the rotation (in seconds).|[[Number]]|Yes|
  
 ====Example:==== ====Example:====
-<code python+<code bauxite
-rotate_entity_towards(player, entity["character_id"], false, 1)+rotate_entity_towards(player, entity["purple_slime"], true, 1);
 </code> </code>
-//Results://+//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]].
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
-Use the **Rotate Entity Towards** function to ...+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.
 </WRAP> </WRAP>
  
rotate_entity_towards.1494277821.txt.gz · Last modified: 2017/05/08 14:10 by 127.0.0.1