So now that i have your attention my problem is that:
i am making a cannon shoot game and i have a cannon that shoots bullets towards the mouse. i fill the distance
between the cannon and the mouse with 10 dots that pointing the target.
Now i want that dots to disappear when they are overlapping a wall and to reappear when they are not.
Something like that lets say the dots is counting 1 from the beginning(cannon) to 10 mouse(target) .when lets say the fifth dot overlaps a wall i want to disappear the fifth dot and all other dots that reach the target(6,7,8,9
and 10) and when there is no overlapping i want to reappear.
something like that.
all dots
----------
overlaps wall
----|
after overlap
----------
keep in mind that i don't want to create a new dot every tick something like this if dots<10 then create dot.
I am pretty sure its tricky.
Any help or suggestion please?
thanks!