This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
reset_entity_rotation [2017/05/03 18:35] – justin | reset_entity_rotation [2021/04/21 18:43] (current) – justin | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- | ---- | ||
- | Resets the entity' | + | Resets the [[entity|entity' |
- | + | ||
- | <WRAP center round info 100%> | + | |
- | This function assumes that the entity was previously rotated using the [[Rotate Entity Towards]] function. | + | |
- | </ | + | |
+ | ====Signature: | ||
<code python> | <code python> | ||
reset_entity_rotation(entity, | reset_entity_rotation(entity, | ||
Line 13: | Line 10: | ||
^Argument^Description^Type^Required^ | ^Argument^Description^Type^Required^ | ||
- | |entity|Entity for which the rotation will be reset.|[[Entity]]|Yes| | + | |entity|[[Entity]] for which the rotation will be reset.|[[Entity]]|Yes| |
- | |duration|Duration of the rotation (in seconds).|[[Decimal]]|Yes| | + | |duration|Duration of the rotation (in seconds).|[[Number]]|Yes| |
+ | |||
+ | <WRAP center round info 100%> | ||
+ | This function assumes that the [[entity]] was previously rotated using [[Rotate Entity Towards]] to face it towards another [[entity]] in the scene. | ||
+ | </ | ||
====Example: | ====Example: | ||
- | < | + | < |
- | reset_entity_rotation(player, 1) | + | reset_entity_rotation(entity[" |
</ | </ | ||
- | // | + | // |
<WRAP center round tip 100%> | <WRAP center round tip 100%> | ||
- | Use the **Reset Entity Rotation** function to reset the player character or an NPC back to the direction they were facing prior to a cutscene | + | Use the **Reset Entity Rotation** function to reset the [[player character]] or an [[NPC]] back to the direction they were facing prior to a cutscene, in particular when they were manually rotated to look at an [[object]] or another [[character]]. |
</ | </ | ||