Tasharen Entertainment Forum
Support => TNet 3 Support => Topic started by: Doomlazy on August 26, 2015, 01:59:18 PM
-
When players get a certain distance away from my player, how do I disable them and fade them out so I can't see them and don't receive their RFC calls?
(And when they get close enough to me again, make them fade back and receive their RFC calls again)?
I am making an MMO so I think this would help put less stress on players computers so they don't render players across the map ;D
Thanks!
Also let me just say this: TNet is amazing!
-
I don't think I explained my question well enough so here is what I meant:
When there are no Players within X distance of me, I want to fade out my player model and update my position less frequently.
I am assuming this requires a list of Players in-game and I do already know how to code that.
All I need to know is how do I write "Is any player in the player list within X distance of me?" in C#?
-
this really isnt a TNet question...
'Vector3.Distance' comes to mind...
however, it seems more appropriate to utilize clipping planes.
another alternative is using 'Physics.OverlapSphere'. although, physics calls should be used sparingly.
-
Not a TNet question. This is a basic game development question. Ask in the Unity forums.
-
The distance question might be a unity game dev question but I would really like to know any approaches people have to implementing a LOD system for an MMO, so that the updated positions frequencies are sent as the question says based on distance away, etc.
-
For my upcoming game, I'll be adding a new feature to TNet -- subscription channels. Similar to current channels, except you can join multiples at once. This is ideal for things like being present in several regions at once (center, left, right, top, bottom for example). As you travel the world you can unsubscribe from one channel and join another as needed. It's actually a pretty simple change, but I need time to do it right. Right now I'm a bit busy with my newborn, so I'll get around to implementing it some time this fall.