This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rotate_entity_towards [2017/05/08 15:43] – justin | rotate_entity_towards [2021/04/21 18:48] (current) – justin | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- | ---- | ||
- | 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 |
+ | ====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|Entity to rotate.|[[Entity]]|Yes| | + | |entity|[[Entity]] to rotate.|[[Entity]]|Yes| |
- | |target_entity|Target entity to rotate the first entity towards.|[[Entity]]|Yes| | + | |target_entity|Target |
- | |also_rotate_target|Should | + | |also_rotate_target|Determines if the target |
- | |duration|Duration of the rotation (in seconds).|[[Decimal]]|Yes| | + | |duration|Duration of the rotation (in seconds).|[[Number]]|Yes| |
====Example: | ====Example: | ||
- | < | + | < |
- | 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 rotate | + | Use the **Rotate Entity Towards** function to have [[character|characters]] look at each other during |
</ | </ | ||