User Tools

Site Tools


rotate_entity_towards

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
rotate_entity_towards [2017/05/08 15:43] justinrotate_entity_towards [2018/03/16 09:47] justin
Line 4: Line 4:
 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. 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(entity, target_entity, also_rotate_target, duration) rotate_entity_towards(entity, target_entity, also_rotate_target, duration)
Line 16: Line 17:
 ====Example:==== ====Example:====
 <code python> <code python>
-rotate_entity_towards(player, entity["character_id"], true, 1)+rotate_entity_towards(player, entity["purple_slime"], true, 1)
 </code> </code>
-//Results:// The player character is rotated to face towards the entity with an ID of "character_id" over a duration of one second. The second entity is also simultaneously rotated to face towards the player character.+//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 rotate characters towards each other as they speak during cutscenes or to have them look towards an object that is the focus of the conversation.+Use the **Rotate Entity Towards** function to have characters look at each other during a cutscene or to have them look towards an object that is the focus of conversation.
 </WRAP> </WRAP>
  
rotate_entity_towards.txt · Last modified: 2021/04/21 18:48 by justin