SyntaxFix
Write A Post
Hire A Developer
Questions
No need to use rectangles ... compare the coordinates of 2 players constantly.
like if(x1===x&&y1==y) remember to increase the range of x when ur comparing.
if(x1===x&&y1==y)
if ur rectangle width is 30 take as if (x1>x&&x2>x+30)..likewise y
if (x1>x&&x2>x+30)