GetNifBlockRotationAlt

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Returns the XYZ rotation (yaw, pitch and roll) angles (in degrees) of the specified NIF block in the calling reference's loaded 3D model. The result XYZ are placed into the 3 specified Script Variables.

  • The 5th 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 6th 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 0, and the script variables are unchanged.

Syntax

[help]
(success:0/1) reference.GetNifBlockRotationAlt blockName:string resX:ScriptVar resY:ScriptVar resZ:ScriptVar whichRotation:int{0-3} pcModel:1/2 

Or:

(success:0/1) reference.GetNifRotAlt blockName:string resX:ScriptVar resY:ScriptVar resZ:ScriptVar whichRotation:int{0-3} pcModel:1/2

Example

objectRef.GetNifBlockRotationAlt "Bucket01:0" fRotX fRotY fRotZ
player.GetNifBlockRotationAlt "ProjectileNode" fRotX fRotY fRotZ 1 1 

See Also