GetLinearVelocityAlt

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Returns the linear velocity on each of the 3 X/Y/Z global axes, of the collision object (if any) attached to the specified node in the calling reference's loaded 3D model. The result XYZ are placed into the 3 specified Script Variables.

  • The velocity is in units of 0.1 Meter/sec, or 7 game units/sec.
  • If the optional 5th argument, getLocal, is non-zero, the result velocities are relative to the object's local axes.
  • If the 3D model does not have the specified node, or the node does not have a mobile collision object, the function returns 0, and the script variables are unchanged.

Syntax

[help]
(success:0/1) reference.GetLinearVelocityAlt nodeName:string resX:ScriptVar resY:ScriptVar resZ:ScriptVar getLocal:0/1

Example

objectRef.GetLinearVelocityAlt "TumbleweedNV" fVelX fVelY fVelZ 1 

See Also