View Single Post
  #174  
Old 07-02-2016, 05:06 AM
Tyen05
Discordant
 
Join Date: Mar 2009
Location: eqbrowser.com
Posts: 309
Default

doing real good on fps now with a bunch of changes.

Clip plane is set to 1200, thats the value in the DB in zone table. Anything past that, the client doesn't render by default. I just added to the NPC script for gameobjects not to render when the camera isnt looking at it. I did this with NPCs only, for now.

Code:
Vector3 screenPoint = Camera.main.WorldToViewportPoint(transform.position);
bool onScreen = screenPoint.z > 0 && screenPoint.x > 0 && screenPoint.x < 1 && screenPoint.y > 0 && screenPoint.y < 1;
if(onScreen == true & screenBool != true){transform.GetChild(0).gameObject.SetActive(true);screenBool = true;}
if(onScreen == false & screenBool != false){transform.GetChild(0).gameObject.SetActive(false);screenBool = false;}
cool video:
https://youtu.be/FSQ7I1EcA08
__________________
Browser based EQ project
Reply With Quote