Open main menu
Home
Random
Log in
Settings
About the CreationKit Wiki
Disclaimers
the CreationKit Wiki
Search
Editing
SetAngle - ObjectReference
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]] [[Category:Latent Functions]] '''Member of:''' [[ObjectReference Script]] Sets the object's current rotation in the world. == Syntax == <syntaxhighlight lang="papyrus"> Function SetAngle(float afXAngle, float afYAngle, float afZAngle) native </syntaxhighlight> == Parameters == *afXAngle: Rotation around the X axis, in degrees. *afYAngle: Rotation around the Y axis, in degrees. *afZAngle: Rotation around the Z axis, in degrees. == Return Value == None. == Examples == <syntaxhighlight lang="papyrus"> ; Set the statue to be facing the other way (180 around Z) ; Z is the compass direction StatueProperty.SetAngle(0.0, 0.0, 180.0) </syntaxhighlight> == Notes == *When rotating an object, it is important to know the order in which the rotation angles are applied. The Z-axis rotation (yaw: north/south/east/west) is applied first, followed by the Y-axis (roll: tilt) and finally the X-axis (pitch: forward/backward). *Skyrim appears to use extrinsic left-handed XYZ angles. **''Extrinsic'' means that world-relative axes are used. Rotating an object along one axis won't change its other axes. **''Left-handed'' means that objects rotate clockwise as angles increase, as opposed to ''right-handed'' systems that use counter-clockwise rotations. *If called on an object whose 3D is not currently loaded (even if the reference is persistent -- which of course it would be if you have an ObjectReference variable pointing at it with which to call this function), this will fail. There will be no error in the script log, but the angles will not actually be changed. == See Also == *[[ObjectReference Script]] *[[GetAngleX - ObjectReference]] *[[GetAngleY - ObjectReference]] *[[GetAngleZ - ObjectReference]] *[[GetHeadingAngle - ObjectReference]] *[[Setting_Local_Rotation]]
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)