예제 #1
0
    void WhileColliding()
    {
        // Adjust flickering bug, not completely solved tho

        if (!hasCollided)
        {
            return;
        }

        bool isInFront = GetDeviceInFront();

        if ((isInFront && !wasInFront) || (wasInFront && !isInFront))
        {
            portalManager.EnterPortal();
        }
        wasInFront = isInFront;
    }