jpw1991 / chebs-necromancy

Cheb's Necromancy adds Necromancy to Valheim via craftable wands and structures. Minions will follow you, guard your base, and perform menial tasks.
The Unlicense
10 stars 4 forks source link

126 neckro null object #131

Closed CW-Jesse closed 1 year ago

CW-Jesse commented 1 year ago

Your code was right. I just filled in my "TODO" comment and only searched current object for ZNetView, which is probably slightly faster. Just means FindClosest can only find interactable objects, which makes sense, right??

jpw1991 commented 1 year ago

I haven't tested yet, but something I don't understand is how this would work. The overlap sphere will hit the subobject that contains the collider, but the parent is what has the actual ZNetView on it. This is why I opted for getting it from parent:

Nevermind, I think I get it. You get the parent already in the statement before this one. Makes sense

image