Multiple collisions not adding to tally
Ok so the situation is this, I have multiple ray casts looking for bombs. When they find one they add it to a tally, the problem is that if there is a bomb to the right and a bomb diagonally the tally remains 1, when it should be 2. If there are multiple bombs to the right, the tally is correct, if there are no bombs to the right and multiple diagonally the tally is correct. It is only when there are bombs to the right and bombs diagonally that the tally is wrong.
# BUG - diagonal collisions dont get added to hoizontal collisions. i.e if a block is on # a diagonal and can see a horizontal bomb and a diagonal bomb it should display 2 if (rr.is_colliding() or ru.is_colliding() or rd.is_colliding()) and !is_in_group("bomb"): while (rr.is_colliding() or ru.is_colliding() or rd.is_colliding()): var obj = rr.get_collider() add += 1 var obj1 = ru.get_collider() add += 1 var obj2 = rd.get_collider() add += 1 objects_collide.append(add) # forces raycasts to continue casting until they dont collide if rr.is_colliding(): rr.add_exception(obj) rr.force_raycast_update() if ru.is_colliding(): ru.add_exception(obj1) ru.force_raycast_update() if rd.is_colliding(): rd.add_exception(obj2) rd.force_raycast_update() if objects_collide.size() == 1: s1.visible = true if objects_collide.size() == 2: s2.visible = true if objects_collide.size() == 3: s3.visible = true