Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

Proximity checking

$
0
0
It pains me to see people using the unet proximity checking, it's really quite bad unfortunately.

If you want something that performs well with thousands of objects I put up the implementation I use in a gist.

https://gist.github.com/gamemachine/e99b675700ee6caafcba

Couple of notes. FindOrCreate takes an id, you can have multiple proximity grids. The second argument 'max' just needs to be a big number, larger then the width of your area. Cell size is basically visibility...

Proximity checking

Viewing all articles
Browse latest Browse all 16796

Trending Articles