VR에서 특정 카메라 뷰포트를 떠날 때 객체가 사라지도록 다른 해결책을 찾아 보았습니다.특정 카메라 뷰포트를 VR에 남겨두면 객체가 사라집니다.
//Create camera planes
Plane[] planes = GeometryUtility.CalculateFrustumPlanes(Camera.main);
//Check if object renderer is in camera view
if (!GeometryUtility.TestPlanesAABB(planes, GetComponent<Renderer>().bounds))
{
//Condition waiting for 2nd object to spawn (To avoid object 1 doesn't disappear instantly)
if (objectCondition.activeSelf)
{
//Deactivate object
gameObject.SetActive(false);
}
}
그러나이는 뷰포트에서 전에 사라 객체 결과 (중간 밖으로 주변, 대신 모든 방법) :
나는 GeometryUtility를 사용하여 다음과 같은 솔루션을 사용하여 끝났다. 이 잘못을 구현하고 있습니까, 아니면 단순히 VR 문제입니까?
범위를 올바르게 설정 했습니까? 스크립트가 현재 게임 개체에 비활성화되어 있습니까? 이 gameobject에는 충돌자가 있습니까? – joreldraw