# can I rotate world position offset to match a mesh's local axis?

**URL:** <https://forums.unrealengine.com/t/can-i-rotate-world-position-offset-to-match-a-meshs-local-axis/451532>\
**Category:** Rendering\
**Tags:** world-position-offse, unreal-engine, question\
**Created:** [July 1, 2019, 9:45am UTC](https://forums.unrealengine.com/t/can-i-rotate-world-position-offset-to-match-a-meshs-local-axis/451532 "2019-07-01T09:45:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MGGeymonat](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mggeymonat/32/1115483_2.png) [@MGGeymonat](https://forums.unrealengine.com/u/MGGeymonat)\
**Post date:** [July 1, 2019, 9:45am UTC](https://forums.unrealengine.com/t/can-i-rotate-world-position-offset-to-match-a-meshs-local-axis/451532/1 "2019-07-01T09:45:16Z")

</div>

Hello everyone

I’m using world position offset with a sine wave to animate a mesh moving on the x axis in world position, but I want to change it so it moves along the mesh’s X axis instead, I assume I should be using a transform node somewhere but I cant seem to get it to work right (my mesh sticks to the center of the world).

Here’s a screenshot of the graph:

 ![281220-wpo-test.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/e/0/8e09569a5e2cd9d85a2f71ba6b14a6e57c0d65af.png)

and a small example of what its doing in engine, notice it doesn’t change when I rotate it.

![281241-wpo-rotation.gif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/3/c/e3c2ac93511aac9296006c63cfc973992a303b15.gif)

---

<div class="post-metadata">

**Author:** ![IndieGameCove](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IndieGameCove](https://forums.unrealengine.com/u/IndieGameCove)\
**Post date:** [July 1, 2019, 11:42am UTC](https://forums.unrealengine.com/t/can-i-rotate-world-position-offset-to-match-a-meshs-local-axis/451532/2 "2019-07-01T11:42:46Z")

</div>

yeah bit tricky with the transforms. world to local, add the offset, local to world, and subtract world position.

 ![281239-localoffset.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/0/7/007d9cf9649bc2c6a149274ec29d4e33c8d8a9bb.png)

---

<div class="post-metadata">

**Author:** ![MGGeymonat](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mggeymonat/32/1115483_2.png) [@MGGeymonat](https://forums.unrealengine.com/u/MGGeymonat)\
**Post date:** [July 1, 2019, 11:57am UTC](https://forums.unrealengine.com/t/can-i-rotate-world-position-offset-to-match-a-meshs-local-axis/451532/3 "2019-07-01T11:57:54Z")

</div>

Hey IndieGameCove, thank you for the reply!  
but someone else just showed me I can use the node TransformVector local to world space and it seems to have the desired effect.

Here’s the graph in case it helps anyone else

 ![281247-wpo-testfixed.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/5/1/05155f358a4d98aa1f2e4d405c7a1023d645b3af.png)
