Can Someone Help Me Detect Div Collision?
h
JWZ6

I'm working on this dodging game. Can someone please help me with detecting if you are dead/hit?

div collision

thanks, JWZ6

You are viewing a single comment. View All
ch1ck3n

just check if the top and left properties of the two elements are in range that they are colliding

so in your case if pos_x and pos_y are same enough as pos_x_2 and pos_y_2 that means its collided

JWZ6

@ch1ck3n THANKS

ch1ck3n

@JWZ6 ping me when its finished i wanna see the finished product :P

JWZ6

@ch1ck3n u like?

ch1ck3n

@JWZ6 yes

JWZ6

@ch1ck3n hol up can i invite u

ch1ck3n

@JWZ6 wait wha

JWZ6

@ch1ck3n i get error

ch1ck3n

@JWZ6

JWZ6

@ch1ck3n yee lol