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

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:

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

281241-wpo-rotation.gif

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

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