Difference between revisions of "Osiris/API/GetRotation"

From Divinity Engine Wiki
Jump to: navigation, search
m
m
Line 10: Line 10:
 
===== Notes =====
 
===== Notes =====
 
* If '''_Target''' is an item and the item is inside the inventory of a character or a container, this call returns the rotation of the character/outermost container.
 
* If '''_Target''' is an item and the item is inside the inventory of a character or a container, this call returns the rotation of the character/outermost container.
* All returned angles are in the interval [-180, 180].
+
* All returned angles are in the interval [-180, 360].
  
 
===== See Also =====
 
===== See Also =====

Revision as of 15:34, 31 January 2018

Full Definition(s)
  • query GetRotation([in](GUIDSTRING)_Target, [out](REAL)_X, [out](REAL)_Y, [out](REAL)_Z)
Description

Returns the rotation of the _Target as rotations around the X, Y and Z axes (Y = vertical axis). It works on any kind of game object.

Return Values
  • Success/Failure: Fails if _Target does not exist.
  • _X: Rotation in degrees of _Target around the X axis.
  • _Y: Rotation in degrees of _Target around the Y axis.
  • _Z: Rotation in degrees of _Target around the Z axis.
Notes
  • If _Target is an item and the item is inside the inventory of a character or a container, this call returns the rotation of the character/outermost container.
  • All returned angles are in the interval [-180, 360].
See Also