TorqueScript Reference

- Main Page
- Related Pages
- Modules
- Classes

Functions
Box Math
Function Categories

## Functions
String | getBoxCenter (box)

## Detailed Description

## Function Documentation

String getBoxCenter | ( | box |  | ) |

Use the getBoxCenter function to find the centroid of a cube (box).

Parameters

  box | A vector containing two three-element floating-point position vectors: "X1 Y1 Z1 X2 Y2 Z2".

Returns
  Returns a vector containing a three-element floating-point position vector equal to the centroid of the area defined by box