GetFacing
From NWN Lexicon
Jump to navigationJump to search
GetFacing(object)
Used to determine which direction something is facing.
float GetFacing(
object oTarget
);
Parameters
oTarget
The object to return the facing value of.
Description
Returns a float between 0.0 and 360.0 that determines which direction oTarget is facing.
Returns -1.0 on error.
Remarks
From version 1.62+, this now rounds the value to the nearest degree.
merricksdad reports the following observations in discord on 2019-July-7:
- Facing 0 is north
- Players and other CreatureObjects have their faciong measure in the Clockwise direction
- Doors and placeables (static or dynamic) have their facing measured in the Counterclockwise direction
- When measuring the facing of a creature in conversation, GetFacing() will return the creature's facing measured before the conversation starts, rather than the facing of the Creature during conversationm, if it has changed..
Version
1.30
See Also
| functions: |
author: Charles Feduke, editor: Jasperre, additional contributor(s): Morz, Keith Voss, Lilac Soul