I created a glass with reflection. The idea is when the player is getting close to a window to see the player reflection like the player is looking on the window.
The glass reflection is working and it's disabled in the Hierarchy. I'm enabling the glass reflection later in the game.
This is a screenshot of the glass when it's turned on : I positioned the glass to on the window :
This is the player screenshot. The player have a child name NAVI. The NAVI is positioned a bit in front of the player : The player have a Rigidbody. In the screenshot on the left the NAVI object and in the right the player Inspector settings :
And this script is attached to the window not to the glass but to the window :
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ItemAction : MonoBehaviour
{
public RotateCamera rotatecamera;
public GameObject glass;
public GameObject player;
public void Init()
{
player.transform.localPosition = new Vector3(transform.localPosition.x - 1, transform.localPosition.y, transform.localPosition.z);
glass.SetActive(true);
}
}
This is a screenshot of the window with the script attached to it :
The idea is when some where in the game when it's calling the method Init it will position the player as much as close to the window to see the player reflection on the glass.
But instead the player is falling down through the floor and keep falling nonstop.


