How to create planar reflection

I need a planar reflection. I created a camera and texture for this. The part of the code about position and orientation is as follows;

var euler = new Vector3(-Camera.MainCamera.EulerAngles.X, -Camera.MainCamera.EulerAngles.Y, Camera.MainCamera.EulerAngles.Z);
ReflectionCam.LocalEulerAngles = euler;
var cposition = new Vector3(-Camera.MainCamera.Position.X,2* Actor.Position.Y- Camera.MainCamera.Position.Y, Camera.MainCamera.Position.Z );
ReflectionCam.Position = cposition;

As a result, the reflection seems to be flipped.

I would be very grateful if you guys could tell me how I can achieve the correct result.

Ok I finally made it. If anyone is wondering, the solution is as follows.

in script;

var euler = new Vector3(-Camera.MainCamera.EulerAngles.X, Camera.MainCamera.EulerAngles.Y, Camera.MainCamera.EulerAngles.Z);
ReflectionCam.LocalEulerAngles = euler;
var cposition = new Vector3(Camera.MainCamera.Position.X,2* Actor.Position.Y- Camera.MainCamera.Position.Y, Camera.MainCamera.Position.Z );
ReflectionCam.Position = cposition;

in shader;

float2 uv=Input0;
uv.y>0.5 ? uv.y = 1.0-uv.y : uv.y; 
Output0.xy=uv;
3 Likes

Can someone tell me the possible cause of the problem seen in the video and how I can get rid of it? Why do reflections of objects appear behind them?