# Wanting to move and rotate a material based on distance from player

**URL:** <https://forums.unrealengine.com/t/wanting-to-move-and-rotate-a-material-based-on-distance-from-player/273593>\
**Category:** Community & Industry Discussion\
**Tags:** unreal-engine\
**Created:** [January 19, 2022, 8:14pm UTC](https://forums.unrealengine.com/t/wanting-to-move-and-rotate-a-material-based-on-distance-from-player/273593 "2022-01-19T20:14:06Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![acatalept](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/acatalept/32/465177_2.png) [@acatalept](https://forums.unrealengine.com/u/acatalept)\
**Post date:** [January 20, 2022, 6:18pm UTC](https://forums.unrealengine.com/t/wanting-to-move-and-rotate-a-material-based-on-distance-from-player/273593/8 "2022-01-20T18:18:26Z")

</div>

Actually I don’t think I went into the World Position Offset details in the thread (just World Origin Shifting, another unrelated concept I was trying to tackle) – I had intended to, sorry 😉

I’ll see if I can come up with a breakdown on my specific WPO implementation and add a post in that thread. In the meantime I think this is what got me pointed in the right direction:

> [@How to create a vertex shader similar to Subway Surfers?](https://forums.unrealengine.com/t/how-to-create-a-vertex-shader-similar-to-subway-surfers/12951/11#post1492733):
>
> It flickers because original mesh goes out of camera view, its culled. And I’m not sure what size of mesh should be, make it work perfectly. That material was just an small expreriment. I found it in my archives and checked in 4.19.2 everything works fine. maybe it not really accurate, but for now I don’t have a time to make any imrovements, sorry )) here is material: And how it works: [[Deformed world] ](https://www.youtube.com/watch?v=EAUzrQfhpio) This mesh have size like 1000020001000 UU

Beware that WPO isn’t currently supported by any raytracing tech in UE 4.x, or Nanite/Lumen in UE 5, and may have some other rendering gotchas that I can’t recall off the top of my head (I have pages of notes for that project that I’ll have to sift through).

Good luck!

---

_[View the full topic](https://forums.unrealengine.com/t/wanting-to-move-and-rotate-a-material-based-on-distance-from-player/273593)._
