# Can't rotate a USceneCaptureComponentCube for Rendering

**URL:** <https://forums.unrealengine.com/t/cant-rotate-a-uscenecapturecomponentcube-for-rendering/394383>\
**Category:** Rendering\
**Tags:** rotation, scene-capture-cube, unreal-engine, Rendering, question, CPP\
**Created:** [May 23, 2017, 6:00pm UTC](https://forums.unrealengine.com/t/cant-rotate-a-uscenecapturecomponentcube-for-rendering/394383 "2017-05-23T18:00:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_08bdc5fd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_08bdc5fd](https://forums.unrealengine.com/u/anonymous_user_08bdc5fd)\
**Post date:** [May 23, 2017, 6:00pm UTC](https://forums.unrealengine.com/t/cant-rotate-a-uscenecapturecomponentcube-for-rendering/394383/1 "2017-05-23T18:00:43Z")

</div>

Hey All,

I’m attempting to use a modified USceneCaptureComponentCube to create quick 360 monoscopic renders with post processing, which works fine, but for some reason I can’t change rotation of the 360 capture to choose a specific direction to be in the center of the render. Rotating the component or the actor does nothing, and I’m wondering if always renders from a set rotation. Any one have any ideas? I’d rather not manually remake the bit array of the rendered image if I don’t have to.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_08bdc5fd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_08bdc5fd](https://forums.unrealengine.com/u/anonymous_user_08bdc5fd)\
**Post date:** [May 24, 2017, 8:18pm UTC](https://forums.unrealengine.com/t/cant-rotate-a-uscenecapturecomponentcube-for-rendering/394383/2 "2017-05-24T20:18:25Z")

</div>

Came up with an alternate solution. I can just modify the order of the FColor data array that is pulled from the CaptureCube render data to fake rotation. Worked like a charm.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_16bccc5d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_16bccc5d](https://forums.unrealengine.com/u/anonymous_user_16bccc5d)\
**Post date:** [February 1, 2019, 1:15am UTC](https://forums.unrealengine.com/t/cant-rotate-a-uscenecapturecomponentcube-for-rendering/394383/3 "2019-02-01T01:15:39Z")

</div>

I needed to do this and came up with another solution, and thought i would post it here.

If you are building UE4 from source, a small edit to  
\Engine\Source\Runtime\Renderer\Private\SceneCaptureRendering.cpp

```
void FScene::UpdateSceneCaptureContents(USceneCaptureComponentCube* CaptureComponent)

```

can change USceneCaptureComponentCube to use the orientation of the component.

just change (line ~818)

```
const FMatrix ViewRotationMatrix = FLocal::CalcCubeFaceTransform(TargetFace);

```

to

```
FTransform Transform = CaptureComponent->GetComponentToWorld();
Transform.SetTranslation(FVector::ZeroVector);
Transform.SetScale3D(FVector::OneVector);
const FMatrix ViewRotationMatrix = Transform.ToInverseMatrixWithScale() * Local::CalcCubeFaceTransform(TargetFace);

```

its kind of a hack, but it works

note that you have to be building from source (ie. github) or changes you make to ue4 source won’t be compiled
