# Fixing bullet trajectory

**URL:** <https://discourse.processing.org/t/fixing-bullet-trajectory/9063>\
**Category:** Processing.py\
**Created:** [March 7, 2019, 6:42am UTC](https://discourse.processing.org/t/fixing-bullet-trajectory/9063 "2019-03-07T06:42:43Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [March 14, 2019, 3:44am UTC](https://discourse.processing.org/t/fixing-bullet-trajectory/9063/9 "2019-03-14T03:44:12Z")

</div>

> [@hsamala](#):
>
> … I am developing a collision method which when the bullet hits a rectangle I want to make the rectangle disappear.

> [@\[SOLVED\] Py.processing bullet and enemy collision](https://discourse.processing.org/t/solved-py-processing-bullet-and-enemy-collision/8327/4):
>
> @solub, your solution is buggy! bug When we delete an item from a list, all elements w/ a higher index than the deleted item got their indices subtracted by 1! face_with_monocle They’re left-shifted, and therefore, the next iteration skips an item; which now got the same index as the just deleted item. arrow_left You can see that bug in this sample loop below: eye : nums = list(range(10)) # [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] for n in nums: print n nums.remove(n) print nums # [1, …

---

_[View the full topic](https://discourse.processing.org/t/fixing-bullet-trajectory/9063)._
