# Rotator -\> Transform3x3Matrix -\> BoxMask-3D (Rotations reversed!)

**URL:** <https://forums.unrealengine.com/t/rotator-transform3x3matrix-boxmask-3d-rotations-reversed/224097>\
**Category:** Rendering\
**Tags:** unreal-engine\
**Created:** [December 22, 2020, 2:44am UTC](https://forums.unrealengine.com/t/rotator-transform3x3matrix-boxmask-3d-rotations-reversed/224097 "2020-12-22T02:44:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Redain31](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Redain31](https://forums.unrealengine.com/u/Redain31)\
**Post date:** [December 22, 2020, 2:44am UTC](https://forums.unrealengine.com/t/rotator-transform3x3matrix-boxmask-3d-rotations-reversed/224097/1 "2020-12-22T02:44:47Z")

</div>

Hello everyone.

I’m having hard time to fixing a problem rotating boxmask-3d in all 3 axis, I managed to fix any 2 at a time but never all together.

Basically, I have a cube component that its rotator is streaming through Forward/Right/Up vectors to feed material parameters. Then those material parameters are passed through a Transform3x3Matrix to match the rotation, and then BoxMask-3d would be perfectly aligned.

All the boxmask’s 3 axis rotate the opposite of the cube!

If I negate any one axis, I get the rest rotating in the right direction.  
If I negate any two axis, I get only 1 axis rotating to the right direction.  
of course, negating all 3 axis is as if none was negated, still all axis rotating to the wrong direction.

How can i drive the boxmask with the cube, sort of absolute parenting in world space.

Here are the blueprints (the work was copied from : - GIFs - Imgur]([Imgur: The magic of the Internet](https://imgur.com/a/js2TynS))):

Material

 ![2020-12-21 21_10_16-MaskMaterial.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/e/9/e9a05885af35c82315dfb47f818f4163c8101f04.png)](filedata/fetch?id=1845574&d=1608603054)  
Construction Script:  
 ![2020-12-21 21_22_50-BP_Cube.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/2/f/2f09c34ffab5e75df155ae7b86103a5b7ae5894e.png)](filedata/fetch?id=1845576&d=1608603793)  
The mask turn the opposite side, same for the other axis: (both objects are components in a blueprint)  
 ![2020-12-21 21_40_06-BP_Cube.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/9/f/9ffaa3d3c7d7b8913ddef054d0b3fb4b1c7db605.png)](filedata/fetch?id=1845577&d=1608604877)

---

<div class="post-metadata">

**Author:** ![EV-Yager1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EV-Yager1](https://forums.unrealengine.com/u/EV-Yager1)\
**Post date:** [August 4, 2022, 2:13pm UTC](https://forums.unrealengine.com/t/rotator-transform3x3matrix-boxmask-3d-rotations-reversed/224097/2 "2022-08-04T14:13:13Z")

</div>

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.

 ![RotateBox3D](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/9/f/99f70ea6f7f637f002db6d55754d4d0624e63d00.jpeg)
