Vicon Shogun banner

Description

Retrieves the local or world-space position of a node at the current time.

Functional area

Data retrieval

Command syntax

Syntax

getPosition "moduleName" [-ws] [-inSpaceOf string] [-preTrans] [-default]

Arguments

NameTypeRequiredComments
nodeNamestringyesThe node to get position for.

Flags

NameFlag argumentsArgument typeExclusive toComments
ws0inSpaceOfSpecifies that the worldspace value should be retrieved. The default is to retrieve local.
inSpaceOf1stringwsThe string passed in with this flag should be a module in the scene. The position returned is relative to the module passed in with this flag from the module passed into the command.
preTrans0defaultGets the pre-translation of the module passed in. Pre-translation can be found in the Attributes panel.
default0preTransThis will retrieve the default position for the module passed in. The default can be viewed in the Channels panel by using the toolbar button with a d.

Return value

vector

Examples

// Get the local and world space position 
// of the rhumerus bone.
vector $localPos;
vector $wsPos;

// First the local
$localPos = `getPosition "rhumerus"`;
// And then the world space
$wsPos = `getPosition "rhumerus" -ws`;
print $localPos;
print $wsPos;

Additional information

Related commands