GetNifBlockRotation

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Returns a 3-element array_var containing the XYZ rotation (yaw, pitch and roll) angles (in degrees) of the specified NIF block in the calling reference's loaded 3D model.

  • The 2nd argument, whichRotation, determines the type of rotation that is returned:
0	(Default) EXTRINSIC (global) rotation, relative to parent node.
1	EXTRINSIC (global) rotation, relative to the world.
2	INTRINSIC (local), relative to parent node.
3	INTRINSIC (local) rotation, relative to the world.
  • The 3rd argument, pcModel, is optional, and may be used when calling the function on the player. The player character has two, completely separate 3D models for 1st and 3rd person. This argument enables to explicitly target one of the models.
1	3rd Person Model
2	1st Person Model
  • If the 3D model does not have the specified block, the function returns ar_Null.

Syntax

[help]
(rotation:array_var) reference.GetNifBlockRotation blockName:string whichRotation:int{0-3} pcModel:1/2 

Or:

(rotation:array_var) reference.GetNifRot blockName:string whichRotation:int{0-3} pcModel:1/2

Example

let aRotation := objectRef.GetNifBlockRotation "Bucket01:0"
let aRotation := player.GetNifBlockRotation "ProjectileNode" 1 1 

See Also