This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rotate_entity_towards [2017/05/08 14:18] – justin | rotate_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, | rotate_entity_towards(entity, | ||
Line 9: | Line 10: | ||
^Argument^Description^Type^Required^ | ^Argument^Description^Type^Required^ | ||
- | |entity|Description.|[[Entity]]|Yes| | + | |entity|Entity to rotate.|[[Entity]]|Yes| |
- | |target_entity|Description.|[[Entity]]|Yes| | + | |target_entity|Target entity to rotate the first entity towards.|[[Entity]]|Yes| |
- | |also_rotate_target|Description.|[[Boolean]]|Yes| | + | |also_rotate_target|Should target entity also be rotated towards the first entity.|[[Boolean]]|Yes| |
- | |duration|Description.|[[Decimal]]|Yes| | + | |duration|Duration of the rotation (in seconds).|[[Decimal]]|Yes| |
====Example: | ====Example: | ||
<code python> | <code python> | ||
- | rotate_entity_towards(player, | + | rotate_entity_towards(player, |
</ | </ | ||
- | // | + | // |
<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 characters look at each other during a cutscene or to have them look towards an object that is the focus of a conversation. |
</ | </ | ||