I want to manipulate the reflection on a mesh by using BABYLON.Matrix.RotationXToRef(Math.PI, reflectionMatrix) (or Y or Z).
Although, when running my code, the reflection is not affected at all.
I set up a playground with a change of the X, Y and Z to the reflection-matrix of one sphere. Although, there is no change of the reflection compared to the second sphere which has an unaltered version of the reflection-matrix:
From line 18 to 20 you just calculate matrix, but you don’t apply them to something.
I’m not comfortable with matrix concepts, so can’t help more than that, however few months ago I’ve asked to get the possibility to update the reflectionTexture position when in skybox_mode. Maybe this playground could help you (check line 86) : https://www.babylonjs-playground.com/#JCZIXE#12
Thanks for the reply. I also checked this playground, but the “normal” Texture has no setReflectionTextureMatrix function, the BABYLON.CubeTexture has the setReflectionTextureMatrix function implemented.
Although, when you check the console, the reflection-matrix of the BABYLON.Texture gets updated.
@Deltakosh my initial intention is to use a dome in JPG format and rotate the reflection. Since I can’t use HDRCubeTexture, which allows reflection rotation, my current workaround is this:
In general this could work. I could save the generated cube reflection images from the probe and reuse them. Unfortunately, this is not an option in my case. I just have the JPG-dome and thats it.