— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
This is an old revision of the document!
Resets the entity's rotation to its original cardinal direction (north, south, west, or east) over the specified duration (in seconds).
reset_entity_rotation(entity, duration)
Argument | Description | Type | Required |
---|---|---|---|
entity | Entity for which the rotation will be reset. | Entity | Yes |
duration | Duration of the rotation (in seconds). | Decimal | Yes |
This function assumes that the entity was previously rotated using Rotate Entity Towards to face it towards another entity in the scene.
reset_entity_rotation(player, 1)
Results: The player is rotated to face their original direction (north, south, west, or east) over a duration of one second.
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.