agar.io-clone
agar.io-clone copied to clipboard
Change area you need to over take someone?
How do I change the size you need to overtake someone? Right now both player needs to be in both centers.
I remember having this problem a little while ago. I believe that you need to go into the src/server/server.js file and you need to find the collision lines and manually increase the radius of the collision boundary.
Ill do my best to find it, I don't know Java Script!
Anyone solved this issue?
I have solved this issue on my local environment, just check the file I mentioned above and it should work fine
Yes, I have been during this 33 min trying different modification on line 533. Where it is apparently where the collision takes place:
if (collision.aUser.mass > collision.bUser.mass * 1.1 && collision.aUser.radius > Math.sqrt(Math.pow(collision.aUser.x - collision.bUser.x, 2) + Math.pow(collision.aUser.y - collision.bUser.y, 2))*2) {
I just can not achieve it, I have tried several configurations of that line but nothing 😔
Yes, I have been during this 33 min trying different modification on line 533. Where it is apparently where the collision takes place:
if (collision.aUser.mass > collision.bUser.mass * 1.1 && collision.aUser.radius > Math.sqrt(Math.pow(collision.aUser.x - collision.bUser.x, 2) + Math.pow(collision.aUser.y - collision.bUser.y, 2))*2) {
I just can not achieve it, I have tried several configurations of that line but nothing 😔
My information is based on commit https://github.com/huytd/agar.io-clone/pull/248/commits/8883ef013938590cee9405476de28651d0001ff7
@bpflt If you could share the specific line where fix this issue would be great
I made that fix years ago on a machine which I no longer have so won't be able to share, but I'll have a look into it at some point soon and see if I can fix.
Cool. No worries I found a different repository with better upgrades including this feature