Besides the standard data types, such as int
, bool
, float
, and so on, there are a lot of other data types in CryENGINE 3, which are very helpful if you start writing your own code:
Vec3
: It represents a vector of three float values, which is used for positions and 3D-vectorsAng3
: It represents a vector of three floats, which is used to represent Euler rotationsMatrix33
: It represents a 3 x 3 float matrix, which is used for the rotation matrixMatrix34
: It represents a 3 x 4 float matrix, which is used to store the rotation matrix with translationQuat
: It represents a Quaternion, which is used to efficiently store rotations and interpolate them
While you work with CryENGINE 3, you will use them a lot. All the common operations are supported, such as addition, subtraction, dot product, cross product, and so on.
Let us see an example of a C++ function to determine which of the two points is the closest to a target point:
Vec3 GetClosestPositionToTarget(const Vec3 target...