# Transform translation relative to world space

What is common algorithm for translating a transform matrix relative to world space axis?
E.g. Matrix M is representing some local space.
When I want to translate M relative to it's own local axis, I just do it like
M.Translate(translationVector);

But what should I do when I want to translate same matrix but relatively to world space axis?

## 2 Answers

pseudo code:

Vector mLocation = (M.41, M.42,M.43);

mLocation += normalizedWorldAxis * distanceToMove;

M.41 = mLocation.x;
M.42 = mLocation.y;
M.43 = mLocation.z;


In general you do not translate transforms. You translate points which are usually represented by vectors.

If you're wondering how to generate a transformation that produces a translation relative to the world axis, then you should look into homogeneous coordinates.