SceneCaptureCube 2D Rotation Yaw / Pitch

Hello, after using this technique, I need to make a 360 video but I need to add my rotation of the player :

float2 Angles = float2(2 * PI * (UV.x + 0.5f), PI * UV.y);

float s = sin(Angles.y);
float3 Direction = float3(s * sin(Angles.x + RotationX), cos(Angles.y), -s * cos(Angles.x + RotationX));

return Direction.xzy;

The RotationX is my player Rotation and allow me to rotate my video with the player controller
But it’s not easy to rotate with the other Angle (Pitch)

Thank you very much

Sorry if I bump it but it’s really important for my 360 video :confused:

You are talking about sampling it with rotation after its been baked, right? If so I would probably use a transform rather than any rotations because a transform is much cheaper.

There is a material function called Inverse Transform Matrix. You will need to specify the vectors. They can be grabbed from getting the forward, right and up vectors from your pawn. Then simply do something like put starting coordinates (such as worldposition) into the “vector to transform” and then your specified axes. Then you should be able to plug the result directly into your cubemap.