SetNifBlockRotation

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Modifies the XYZ rotation (pitch, roll and yaw) angles (in degrees) of the specified NIF block in the calling reference's loaded 3D model.

  • The 5th argument, method, determines how the rotation is modified:
0	(Default) Set the EXTRINSIC (global) rotation, relative to parent node.
1	Rotate the INTRINSIC (local) rotation by the specified XYZ values.
2	Set the INTRINSIC (local) rotation, relative to parent node.
3	(Reserved)
4	Rotate the EXTRINSIC (global) rotation by the specified XYZ values.
5	Set the EXTRINSIC (global) rotation, relative to the world, such that the block will face the specified XYZ (given as COORDINATES - not angles!).
  • 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

Syntax

[help]
reference.SetNifBlockRotation blockName:string rotX:float rotY:float rotZ:float method:int{0-5} pcModel:1/2 

Or:

reference.SetNifRot blockName:string rotX:float rotY:float rotZ:float method:int{0-5} pcModel:1/2

Example

objectRef.SetNifBlockRotation "Bucket01:0" 68 137 -25
objectRef.SetNifBlockRotation "Bucket01:0" 0 30 90 1 

Notes

  • The changes are reset once the calling reference's parent cell is reloaded, or Update3D is called on it.

See Also