This information is for Vicon Shogun 1.7. For up-to-date help, see the latest Shogun documentation.

Vicon Shogun banner


Measures the distance between two nodes in a scene.

The default behavior (no flags used) returns the distance at the current frame. The -avg, -min, -max, -range, and -sd flags all return a value that's based on a number of frames. That number of frames is the play range by default unless the -rangesOnly option is used.

Functional area

Data retrieval

Command syntax


getDistance node1 node2 [-avg] [-min] [-max] [-range] [-sd] [-rangesOnly] [-mustHaveKeys]


node1stringyesNode to measure from
node2stringyesNode to measure to


NameFlag argumentsArgument typeExclusive toComments
-avg0-min, -max, -range, -sdReturns the average distance
-min0-avg, -max, -range, -sdReturns the minimum distance
-max0-avg, -min, -range, -sdReturns the maximum distance
-range0-avg, -min, -max, -sdReturns the difference of the min and max
-sd0-avg, -min, -max, -rangeReturns the standard deviation
-rangesOnly0Computes distance calculations over the selected time ranges only
-mustHaveKeys0Only computes distance on frames where both nodes have a key present

Return value


Returns the distance in mm from node1 to node2


// create a clip
create Clip Clip_1;

// create two objects which we want to compute distances between
create Marker Marker_1;
create Bone Bone_1;

// move the bone 300 and 400 in x, y (respectively
setKey "Translation.X" 300 -onMod Bone_1;
setKey "Translation.Y" 400 -onMod Bone_1;

// show that the bone is 500 mm away from the marker as expected
print(getDistance("Marker_1", "Bone_1"));

Additional information

Related commands