| Home Page | Recent Changes | Preferences

Built-In Structs

These structs are declared in Object and can be used everywhere in UT2003's UnrealScript. Many of these have operators defined for them.

See Built-in Structs (UT) for the UT built-in structs.


A globally unique identifier.

struct Guid
    var int A, B, C, D;


A point or direction vector in 3d space.

struct Vector
    var() config float X, Y, Z;

See Useful Maths Functions for some useful vector assignment operators.

You can specify constant vectors in code by using vect(x,y,z), where x, y and z must be float literals, i.e. actual numbers.

Plane (extends Vector)

A plane definition in 3D space. See Plane.

struct Plane extends Vector
                           // inherited: normal vector X, Y, Z
    var() config float W;  // distance from origin

This could also be used to describe a sphere: X, Y, Z is the location of the sphere's center and W is the radius.


An orthogonal rotation in 3d space. See Rotator.

struct Rotator
    var() config int Pitch, Yaw, Roll;

You can specify constant rotators in code by using rot(pitch,yaw,roll), where pitch yaw and roll must be integer literals, i.e. actual numbers.


An arbitrary coordinate system in 3d space.

struct Coords
    var() config vector Origin, XAxis, YAxis, ZAxis;


See Quaternion.

struct Quat
    var() config float X, Y, Z, W;


Used to generate random values between Min and Max.

struct Range
    var() config float Min;
    var() config float Max;

It seems you can specify constant ranges in code by using rng(min,max), where min and max must be float literals, i.e. actual numbers, but this causes a "Bad expr token 35" compiler crash in UT2003 v2225 and probably also earlier versions. It might be a feature in later engine versions.


Vector of Ranges.

struct RangeVector
    var() config range X;
    var() config range Y;
    var() config range Z;


A scale and sheering.

struct Scale
    var() config vector Scale;
    var() config float SheerRate;
    var() config enum ESheerAxis
    } SheerAxis;


An RGBA color.

struct Color
    var() config byte R, G, B;  // red, green, blue color components
    var() config byte A;        // alpha component

See also the page on custom Color Operators.

Note that many functions and class variables don't use this struct for colours, eg ZoneInfo's ViewFog.


A bounding box. (Note the name change from UT: BoundingBox)

struct Box
    var vector Min, Max;
    var byte IsValid;


struct IntBox
    var int X1, Y1, X2, Y2;


struct FloatBox
    var float X1, Y1, X2, Y2;

BoundingVolume (extends Box)

A bounding box sphere together.

struct BoundingVolume extends Box
    var plane Sphere;


A 4x4 matrix.

struct Matrix
    var() Plane XPlane;
    var() Plane YPlane;
    var() Plane ZPlane;
    var() Plane WPlane;


A single interpolation point used in the InterpCurve struct. It maps an input value to a particular output value. See InterpCurve below for more details.

struct InterpCurvePoint
    var() float InVal;
    var() float OutVal;


A struct which holds output values for a set of input values. The array which is formed is used to query for an interpolated output value for any input value. See Global Functions InterpCurveEval, InterpCurveGetOutputRange, and InterpCurveGetInputDomain for more details.

struct InterpCurve
    var() array<InterpCurvePoint>   Points;


struct CompressedPosition
    var vector Location;
    var rotator Rotation;
    var vector Velocity;

Related Topics

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands


Mapping Topics

Mapping Lessons

UnrealEd Interface


Scripting Topics

Scripting Lessons

Making Mods

Class Tree


Modeling Topics


Log In