I never used quaternions before, so I’ll need to make some testing.

But as I can see, I’ll need to get the length of my local vector, convert it to rotator, then convert it to quaternion, calculate the result, convert back to rotator, then to vector and multiply by it’s original length. It’s a bit complicated.

This is my solution for rotators in UDK, just in case:

```
static function rotator RotToWorld(rotator A, rotator B)
{
local vector X, Y, Z;
GetAxes(A, X, Y, Z);
X = X >> B;
Y = Y >> B;
Z = Z >> B;
return OrthoRotation(X, Y, Z);
}
static function rotator RotToLocal(rotator A, rotator B)
{
local vector X, Y, Z;
GetAxes(A, X, Y, Z);
X = X << B;
Y = Y << B;
Z = Z << B;
return OrthoRotation(X, Y, Z);
}
```

A is the rotator to convert, B is the relative rotation.

GetAxes() takes rotator and returns 3 vectors, representing it’s local axes. OrthoRotation() converts 3 vectors back to rotator.