예제 #1
0
    void Update()
    {
        //Is the render visible to the camera? If so, set it to active in the scene, else deactivate it
        rayOrigin.SetActive(GetComponent <Renderer>().IsVisibleFrom(Camera.main) ? true : false);

        //Rotates the lens rays to the camera to mimic the light bouncing inside the abnormal lens
        rayOrigin.transform.localRotation = Camera.main.transform.localRotation;

        myChild.SetActive(BaneRays.VewNotObstructed(objectBounds, transform, target.transform, true) ? true : false);
    }
예제 #2
0
 void Update()
 {
     myChild.SetActive(BaneRays.VewNotObstructed(objectBounds, transform, target, true) ? true : false);
 }