Even with pickup distance set in the cfg, and using F2 to change the distance, the actual distance doesn't change. It will pickup items from very far away.
With my limited knowledge of coding, I think the problem is here.
Shouldn't this line use a variable instead of a hard coded distance? I could be completely wrong, mind you, lol.
Thanks for working to help improve our gaming experience. :)
Even with pickup distance set in the cfg, and using F2 to change the distance, the actual distance doesn't change. It will pickup items from very far away. With my limited knowledge of coding, I think the problem is here.
https://github.com/jokeruarwentto/AutoPickup/blob/5487d527158824369df4237da9965355b60f27bc/src/Plugin.cs#L67
Shouldn't this line use a variable instead of a hard coded distance? I could be completely wrong, mind you, lol. Thanks for working to help improve our gaming experience. :)
EDIT: I changed that line to
item.transform.position) <= _distances[_currentDistance]))
And that seems to fix it.
Also, I noticed that _currentDistance is always zero when the game loads, it doesn't get set via the config. So I added this to Awake()
_currentDistance = (int)_distance.Value;
Not sure if that's preferred/clean way of doing those, but it seems to work as intended now. ;)