# How to rotate a cylindrical distance field?

**URL:** <https://forums.unrealengine.com/t/how-to-rotate-a-cylindrical-distance-field/682239>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE5-0, Blueprint\
**Created:** [November 2, 2022, 7:13am UTC](https://forums.unrealengine.com/t/how-to-rotate-a-cylindrical-distance-field/682239 "2022-11-02T07:13:11Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [November 2, 2022, 7:42pm UTC](https://forums.unrealengine.com/t/how-to-rotate-a-cylindrical-distance-field/682239/4 "2022-11-02T19:42:32Z")

</div>

Ok, I have already managed to rotate and translate the distance field of cylindrical.

 ![casi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/0/0/b007f1d2e04f81d86830891c3dc06a3d86f21b6e.jpeg)

I got a part of the code in this post:

> [@Rotator -\> Transform3x3Matrix -\> BoxMask-3D (Rotations reversed!)](https://forums.unrealengine.com/t/rotator-transform3x3matrix-boxmask-3d-rotations-reversed/224097/2):
>
> Instead of using a Transform3x3Matrix, you can do it a bit more manually with a bit of math. The screenshot below shows how I did it.

And the other part of the code I got in this other post:

> [@Making a cylindrical mask instead of sphere](https://forums.unrealengine.com/t/making-a-cylindrical-mask-instead-of-sphere/316473/4):
>
> I made the cylinder distance field from above into a material network that you can copy. What this does is return a distance field for a the world. This is set up so that “height” also scales worldposition. To scale the cylinder, multiply worldposition by something first. To offset it, add something. Here is that material applied to a few static mesh planes. You can see how each plane shows a cross section of where it intersections the cylinder function. I…

However and although my main problem is already solved. I consider that the code is not yet complete.

That is, the following is missing:  
-Choose the radius of the cylinder  
-Modify the scale of the cylinder.

If someone is good at image vector math maybe I can post here how to do it.  
Because I’m very very newbie… I’ve been looking for the solution to this problem all day. 🥴

Thank you very much!!

---

_[View the full topic](https://forums.unrealengine.com/t/how-to-rotate-a-cylindrical-distance-field/682239)._
