User Tools

Site Tools


reset_entity_rotation

This is an old revision of the document!


Reset Entity Rotation


Resets the entity's rotation to its original cardinal direction (north, south, west, or east) over the specified duration (in seconds).

This function assumes that the entity was previously rotated using the Rotate Entity Towards function.

reset_entity_rotation(entity, duration)
ArgumentDescriptionTypeRequired
entityEntity for which the rotation will be reset.EntityYes
durationDuration of the rotation (in seconds).DecimalYes

Example:

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.


Editor Node:

Visual Demo:

reset_entity_rotation.1493861911.txt.gz · Last modified: 2017/05/03 18:38 by justin