Editing
GetAngleZ - ObjectReference
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
[[Category:Scripting]] [[Category:Papyrus]] '''Member of:''' [[ObjectReference Script]] Gets this object's rotation around the z axis. == Syntax == <syntaxhighlight lang="papyrus"> float Function GetAngleZ() native </syntaxhighlight> == Parameters == None. == Return Value == This object's rotation around the Z axis, in degrees. Z angle is measured with the positive ''y''-axis as 0 and increasing clockwise from there. == Examples == <syntaxhighlight lang="papyrus"> Debug.Trace("We are rotated " + GetAngleZ() + " degrees around the Z axis") </syntaxhighlight> == Notes == * In the Tamriel worldspace, a Z angle of 0 is North, however, the same is not true of interiors (other exterior worldspaces have not been tested) β GetAngle is based on the game's coordinate system and the Compass is based on the NorthMarker object in each cell. Therefore, GetAngle Z is only useful for determining compass directions in the exterior Tamriel worldspace. *In addition to the above statement, if the cell doesn't contain a NorthMarker, the Compass will revert back to the coordinate system for that cell. * Note that standard mathematical notation has 0 starting on the ''x''-axis, rather than the ''y''-axis, and increases counter-clockwise, not clockwise. Trigonometry (see [[Math Script]]) with the Z angle thus requires using the following conversion formula: <syntaxhighlight lang="papyrus">float GameAngleZ ;the game's version float TrigAngleZ ;the rest of the world's interpretation of the same GameAngleZ = Game.GetPlayer().GetAngleZ() if ( GameAngleZ < 90 ) TrigAngleZ = 90 - GameAngleZ else TrigAngleZ = 450 - GameAngleZ endif</syntaxhighlight> == See Also == *[[ObjectReference Script]] *[[GetAngleX - ObjectReference]] *[[GetAngleY - ObjectReference]] *[[GetHeadingAngle - ObjectReference]] *[[SetAngle - ObjectReference]] *[[GetAngle]] Console Function
Summary:
Please note that all contributions to the CreationKit Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
CreationKit:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Landing page
Tutorials
Game Systems
Editor Reference
Scripting Reference
Recent changes
Help
Tools
What links here
Related changes
Special pages
Page information
Page values