Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #26  
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
 

Tags
pras eqbrowser.com, unity3d


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 02:26 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3