# transform the local coordinate to global coordinat

**URL:** <https://tech-community.robotics.abb.com/t/transform-the-local-coordinate-to-global-coordinat/4697>\
**Category:** Developer Tools\
**Created:** [February 23, 2012, 12:40am UTC](https://tech-community.robotics.abb.com/t/transform-the-local-coordinate-to-global-coordinat/4697 "2012-02-23T00:40:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wzqneu](https://avatars.discourse-cdn.com/v4/letter/w/e9bcb4/32.png) [@wzqneu](https://tech-community.robotics.abb.com/u/wzqneu)\
**Post date:** [February 23, 2012, 12:40am UTC](https://tech-community.robotics.abb.com/t/transform-the-local-coordinate-to-global-coordinat/4697/1 "2012-02-23T00:40:08Z")

</div>

hi,every body,

when i got the vector3 of a vertex. i can find the body coordinate values. but i find this value is in local coordinate. i wan to transform this local coordinate to global coordinate. i use the TransformVector to realize this function.  
the definition of TransformVector as follow:

```auto
public Vector3 TransformVector(
	Matrix4 from,
	Matrix4 to
)

```

```auto
my code:

```

```auto
Vector3 vertextrans = codege.Edge.EndVertex.Position;
                                  
Matrix4 localmatrix = body.Transform.Matrix;

Matrix4 worldmatrix = station.Transform .GlobalMatrix;

Vector3 tmp =vertextrans.TransformVector(localmatrix,worldmatrix);

```

```auto

```

```auto
--------------------------------------------------------

```

```auto
i want to transform the local vertor3 into world coordinate,but there is no effect,.what is wrong with the code?

```

```auto
i guess maybe there is mistake in obtaining the matrix,

```
